By Axel_V on
When I activate the G2 glossary Module I get the following error message:
user warning: You have an error in your SQL syntax. Check the manual that corresponds to your MySQL server version for the right syntax to use near 'DEFAULT CHARSET=utf8 COMMENT='Extensions to node for g2 module' query: CREATE TABLE `g2_node` ( `nid` int(11) NOT NULL default '0', `period` varchar(50) default NULL, `complement` mediumtext, `origin` mediumtext, PRIMARY KEY (`nid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='Extensions to node for g2 module' in /homepages/18/d126859316/htdocs/newSiteDevelopment/Drupal/includes/database.mysql.inc on line 120.
(I work with MySQL 4.0 on Drupal 4.7)
Comments
I can add content though...
The other strange thing is that I can add terms to the glossary which will show up. I can even edit them. However I always loads of errors such as:
* user warning: Table 'db171351605.g2_node' doesn't exist query: SELECT * FROM g2_node WHERE nid = 27 in /homepages/18/d126859316/htdocs/newSiteDevelopment/Drupal/includes/database.mysql.inc on line 120.
* user warning: Table 'db171351605.g2_referer' doesn't exist query: UPDATE g2_referer SET incoming = incoming + 1 WHERE nid = 27 AND referer = '?q=g2/initial/t' in /homepages/18/d126859316/htdocs/newSiteDevelopment/Drupal/includes/database.mysql.inc on line 120.
If I check my database, there is definitely no g2 table or anything remotely like it.
See http://drupal.org/node/76177
What is happening is the you are actually using g2 on the basic drupal nodes, without the extensions brought in by G2, which causes all the errors you see: you're missing tables
g2_nodeandg2_referer.What is happening is the fact that install failed, because your version of MySQL is too old: version 4.0 did not understand some clauses like "ENGINE=MyISAM DEFAULT CHARSET=utf8 COMMENT='G2 referer stats for link exchange'" so you can just remove them.
The simplest fix if you want to keep on using this MySQL version is to manually install the g2.mysql file, for instance from PHPMyAdmin, possibly editing it to remove MySQL 4.1 specific information.
If you have more time, could you roll up a patch to g2.install so that it takes into account 4.0 ?
In the meantime, I'm adding a "requirements" section in the docs, because the need for 4.1 was not yet documented.
Patch for 4.0
Hi fgm,
Thanks for this info and sorry for the late repsonse. I tried to manually install but it wouldn't work. And unfortunately as my PHP skills are towards zero I'm not able to deliver the patch. I'll have to deal without the glossary then.
Install file available for G2 4.7.x
An install file has now been added to the G2 module for 4.7.x.