PDA

View Full Version : How i can do when i used VB was UTF8 and mysql was UTF8 too


CNTEAM
07-06-2006, 03:36 AM
i really like vbDrupal verymuch but my VB 3.5.4 ' charset was UTF8 and mysql default setting was UTF8. When i import the newest vbDrupal's .xml from here. VB shows the database error:


Database error in vBulletin 3.5.4:

Invalid SQL:
CREATE TABLE drupal_amazonitem (

ASIN varchar(10) NOT NULL default '',

DetailPageURL text,

SmallImageURL varchar(255) default '',

SmallImageHeight int(10) unsigned default '0',

SmallImageWidth int(10) unsigned default '0',

MediumImageURL varchar(255) default '',

MediumImageHeight int(10) unsigned default '0',

MediumImageWidth int(10) unsigned default '0',

LargeImageURL varchar(255) default '',

LargeImageHeight int(10) unsigned default '0',

LargeImageWidth int(10) unsigned default '0',

Author varchar(255) NOT NULL default '',

Binding varchar(100) default '',

listAmount int(10) unsigned default '0',

listCurrencyCode char(3) default '',

listFormattedPrice varchar(10) default '',

Title varchar(100) NOT NULL default '',

Amount int(10) unsigned default '0',

CurrencyCode char(3) default '',

FormattedPrice varchar(10) default '',

Availability varchar(50) default '',

PriceDate datetime default '0000-00-00 00:00:00',

PRIMARY KEY (ASIN),

UNIQUE KEY ASIN (ASIN),

KEY Title (Title),

KEY Author (Author,Title)

) TYPE=MyISAM;

MySQL Error : Specified key was too long; max key length is 1000 bytes
Error Number : 1071
Date : Thursday, July 6th 2006 @ 04:42:15 PM
Script : http://www.xxxxx.com/forum/admincp/plugin.php
Referrer : http://www.xxxxx.com/forum/admincp/plugin.php?do=productadd
IP Address : www.xxxxx.com
Username : admin
Classname : vb_database

please help me , so many thanks!

elmuerte
07-07-2006, 12:56 AM
Use the following updated product xml: http://www.vbdrupal.org/forum/attachment.php?attachmentid=40&d=1152252060

that should fix the problem

CNTEAM
07-10-2006, 12:09 AM
Thanks ,i installed the vbdrupal.but a new problem , all of the buttons "Save Configuration" in vbDrupal cann't use.when i click the button there was no response at all.

is it from the utf-8? or others?

CNTEAM
07-11-2006, 04:58 AM
i have settled the problem.

use xxx editors which can change the coding of .xml file, i use emeditor.

then open the file elmuerte provided.

<?xml version="1.0" encoding="ISO-8859-1"?>

<product productid="drupal" active="1">
<title>vB Drupal</title>


change to

<?xml version="1.0" encoding="UTF-8"?>

<product productid="drupal" active="1">
<title>vB Drupal</title>

save file to utf-8 coding. import the product to vb.

all done!

CNTEAM
07-11-2006, 05:03 AM
it's the right file for vb which all data is utf-8.

elmuerte
07-11-2006, 07:33 AM
And now everything works!? That's strange, quite strange

CNTEAM
07-11-2006, 07:57 AM
yes , everything works now. i'm no sure why it not worked before, but when i change the file's coding, everything is ok.