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

avpaderno’s picture

Title: user warning: Out of range value for column 'changecount' at row 1 query: » Out of range value for column 'changecount'
dave reid’s picture

Assigned: Unassigned » dave reid

I'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.

dave reid’s picture

Hmm. 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);

dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

@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 = 137

dig1’s picture

Hi, 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

dave reid’s picture

Ack, remove the curly braces from the SQL then it will work. I always forget to remove them when I copy-paste from code...

dig1’s picture

Here'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
******************************************************************************

dave reid’s picture

Status: Postponed (maintainer needs more info) » Fixed

Still not sure how we originally got -1 for the value, but I've added max() to help prevent this case again. Marking as fixed.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.