error received upon installing xml sitemaps

walden - March 6, 2008 - 21:53
Project:XML Sitemap
Version:5.x-1.4
Component:xmlsitemap
Category:support request
Priority:normal
Assigned:Unassigned
Status:by design
Description

Hi, I'm receiving the following error after enabling the module:

user warning: Duplicate entry '19' for key 1 query: xmlsitemap_node_enable INSERT INTO xmlsitemap_node (nid, pid, last_changed, last_comment, previous_comment) SELECT n.nid, ua.pid, n.changed, s.last_comment_timestamp, MAX(c.timestamp) FROM node n LEFT JOIN node_comment_statistics s ON s.nid = n.nid LEFT OUTER JOIN comments c ON c.nid = n.nid AND c.timestamp < s.last_comment_timestamp LEFT JOIN xmlsitemap_node xn ON xn.nid = n.nid LEFT JOIN url_alias ua ON ua.src = CONCAT('node/', n.nid) WHERE xn.nid IS NULL GROUP BY n.nid, ua.pid, n.changed, s.last_comment_timestamp in /usr/www/users/harry100/includes/database.mysql.inc on line 172.

I previously had gsitemaps module installed - I'm not sure if this could be affecting it.

I'm runnign drupal 5.1 with MySQL database 4.1.20 and
PHP 4.3.10

Any suggestions on fixes are greatly appreciated. Thanks.

#1

ashtronaut - March 6, 2008 - 22:24

This may be a repeat of http://drupal.org/node/212948 . I believe lefnire had a similar issue when having gsitemaps installed. He fixed it by manually dropping the gsitemap tables. You can check out his solution here.

http://drupal.org/node/212948#comment-706898

Hopefully this helps.

ash

#2

walden - March 7, 2008 - 17:10

I dropped the gsitemaps table, but am still seeing the same error message.

It sounds like this patch: http://drupal.org/node/199413#comment-680050

might be relevant to this error. Is that correct? should i try the patch?

Thanks

#3

ashtronaut - March 7, 2008 - 19:18

I'm not sure if it is a good idea to apply that patch. It doesn't look like that specific one got committed and it also doesn't look like it solved the problem. If you read on in that thread, it looks like darren oh had helped fix that thread's issue and posted his changes in cvs.

You can see his changes here
http://drupal.org/node/199413#comment-682904

You can get a copy of dev here
http://ftp.drupal.org/files/projects/xmlsitemap-5.x-1.x-dev.tar.gz

ash

#4

walden - March 10, 2008 - 15:50

I tried the new dev version, but it is not recreating the database tables. I'm also receiving this message upon activating it:

* user warning: Table 'harry100_drupaltest.xmlsitemap_node' doesn't exist query: xmlsitemap_node_enable UPDATE xmlsitemap_node xn INNER JOIN node n ON xn.nid = n.nid LEFT JOIN node_comment_statistics s ON s.nid = xn.nid SET xn.previously_changed = xn.last_changed, xn.last_changed = n.changed, xn.last_comment = s.last_comment_timestamp WHERE xn.nid = n.nid AND (xn.last_changed <> n.changed OR xn.last_comment <> s.last_comment_timestamp) in /usr/www/users/harry100/test/includes/database.mysql.inc on line 172.
* user warning: Table 'harry100_drupaltest.xmlsitemap_node' doesn't exist query: xmlsitemap_node_enable INSERT INTO xmlsitemap_node (nid, pid, last_changed, last_comment, previous_comment) SELECT n.nid, MAX(ua.pid), n.changed, s.last_comment_timestamp, MAX(c.timestamp) FROM node n LEFT JOIN node_comment_statistics s ON s.nid = n.nid LEFT OUTER JOIN comments c ON c.nid = n.nid AND c.timestamp < s.last_comment_timestamp LEFT JOIN xmlsitemap_node xn ON xn.nid = n.nid LEFT JOIN url_alias ua ON ua.src = CONCAT('node/', n.nid) WHERE xn.nid IS NULL GROUP BY n.nid, n.changed, s.last_comment_timestamp in /usr/www/users/harry100/test/includes/database.mysql.inc on line 172.

Is there maybe something else I have to clear out first?

#5

ashtronaut - March 11, 2008 - 22:20

After you disable modules do you uninstall them with /admin/build/modules/uninstall ? Maybe after you install the dev file an update.php needs to be run. I'm not quite sure what is going on here. I can't replicate it at all on my side.

ash

#6

Todd Nienkerk - March 14, 2008 - 17:03

I'm getting the same error, though I should note this involves a 4.7.x->5.x site overhaul.

I first tried installing XML Sitemap and got all the DB errors listed above. I have since uninstalled (via the Uninstall tab) and re-enabled the module many times with the same results. All legacy gsitemap tables have been dropped from our DB.

I tried installing the dev version of the XML Sitemap module linked above, but I still got two of the errors I used to see. (Two's better than three, I guess, but I'm still having problems.) Here are the errors:

* user warning: Table ‘DATABASENAME.gsitemap_additional’ doesn’t exist query: INSERT INTO xmlsitemap_additional (path, pid, last_changed, previously_changed, priority) SELECT path, pid, last_changed, previously_changed, priority FROM gsitemap_additional in /var/www/vhosts/dev.WEBSITE.com/httpdocs/includes/database.mysql.inc on line 172.
* user warning: Table ‘DATABASENAME.gsitemap’ doesn’t exist query: INSERT INTO xmlsitemap_node (nid, pid, last_changed, previously_changed, last_comment, previous_comment, priority_override) SELECT nid, pid, last_changed, previously_changed, last_comment, previous_comment, priority_override FROM gsitemap in /var/www/vhosts/dev.WEBSITE.com/httpdocs/includes/database.mysql.inc on line 172.

#7

Darren Oh - March 14, 2008 - 17:47
Status:active» by design

Those two error messages are displayed when you have dropped the gsitemap tables without uninstalling gsitemap. They're harmless.

#8

walden - March 14, 2008 - 18:38

I can accept some harmless error messages, but the module still isn't working. I'm not seeing a table in the database for xml sitemaps.

Like Todd, I enabled/re-enabled the module several times. I also used to have gsitemaps, and unfortunately didn't use the uninstall when I removed it.

Is there no way to perform some sort of reset which will allow this module to work properly?

Thanks again

 
 

Drupal is a registered trademark of Dries Buytaert.