Hi
I am a new user of xmlsitemap. I am running 6.12 and yesterday I installed the xmlsitemap 6.x-2.x-dev module. I built a sitemap and everything in the garden wss rosy.
However, since then each page that I subsequently add to the website gives me the following error message:
***************************************************************************************
user warning: Out of range value for column 'changecount' at row 1 query: INSERT INTO xmlsitemap (id, type, loc, status, lastmod, priority, priority_override, changefreq, changecount, node_type) VALUES (137, 'node', 'node/137', 1, 1244903240, NULL, NULL, 0, -1, 'page') in F:\www\mydomain.com\sites\all\modules\xmlsitemap\xmlsitemap.module on line 798.
***************************************************************************************
Furthermore mydomain/sitemap.xml is not automatically being updated but requires me to rebuild the sitemap.
Should these things be happening?
Cheers
Comments
Comment #1
avpadernoComment #2
dave reidI'll look into the out of range problem, which is odd.
The updating problem, double check your sitemap's "minimum lifetime" setting at admin/settings/xmlsitemap. You also need to make sure that your site's cron.php is run regularly. Be sure to double check for any "XML sitemap" messages at admin/reports/status.
Comment #3
dave reidHmm. the only way this could happen is if this query returns no results, which means there is something more larger breaking in Drupal's node reivison table:
db_query("SELECT c.timestamp FROM {comments} c WHERE c.nid = %d AND c.status = %d UNION ALL SELECT nr.timestamp FROM {node_revisions} nr WHERE nr.nid = %d", $node->nid, COMMENT_PUBLISHED, $node->nid);Comment #4
dave reid@Dig1: Can you please run this SQL query on your Drupal install's database?
SELECT c.timestamp FROM {comments} c WHERE c.nid = 137 AND c.status = 0 UNION ALL SELECT nr.timestamp FROM {node_revisions} nr WHERE nr.nid = 137Comment #5
dig1 commentedHi, thanks for coming back so quickly.
1) Well the good news is that when I run CRON the sitemap.xml seems to be updated correctly :)
2) My spec is running localhost on VISTA SP2, MySQL database 5.1.31, PHP memory limit 256M, Web server Apache/2.2.11 (Win32) PHP/5.2.8.
3) When I run the query you suggest using phpmyadmin I get:
#1064 - 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 '} c WHERE c.nid = 137 AND c.status = 0 UNION ALL SELECT nr.timestamp FROM {node_' at line 1
SELECT c.timestamp
FROM {comments}c
WHERE c.nid =137
AND c.status =0
UNION ALL SELECT nr.timestamp
FROM {node_revisions}nr
WHERE nr.nid =137;
LIMIT 0 , 30
I don't really know SQL, should I be doing it another way?
Thanks
Comment #6
dave reidAck, remove the curly braces from the SQL then it will work. I always forget to remove them when I copy-paste from code...
Comment #7
dig1 commentedHere's the result David.
*****************************************************************************
Showing rows 0 - 0 (1 total, Query took 0.0007 sec)
SELECT c.timestamp
FROM comments c
WHERE c.nid =137
AND c.status =0
UNION ALL SELECT nr.timestamp
FROM node_revisions nr
WHERE nr.nid =137
LIMIT 0 , 30
+ Options
timestamp
1244923297
******************************************************************************
Comment #8
dave reidStill not sure how we originally got -1 for the value, but I've added max() to help prevent this case again. Marking as fixed.