It seems that an updated node will not correctly adjust its last and previously modified dates.

In the nodeapi hook in xmlsitemap_node.module, the actual SQL UPDATE string is:
UPDATE {xmlsitemap_node}
SET pid = %s, previously_changed = last_changed, priority_override = %s
WHERE nid = %d

Note that previously_changed is set to last_changed, but last_changed itself is not updated.

To compare this to the (IMHO correct) change update code in xmlsitemap_node.install (executed in the enable() function, for nodes that are already in xmlsitemap_node table):
UPDATE {xmlsitemap_node} xn, {node} n
SET xn.previously_changed = xn.last_changed, xn.last_changed = n.changed
WHERE xn.nid = n.nid AND xn.last_changed <> n.changed

The key change here, obviously, is that previously_changed is set to last_changed, but then last_changed is changed to the node's last change datetime. That is what the .module nodeapi() function seems to be missing.

Comments

darren oh’s picture

Status: Active » Fixed

Fixed in CVS commit 88219.

darren oh’s picture

Version: 5.x-1.x-dev » 5.x-1.2
Anonymous’s picture

Status: Fixed » Closed (fixed)

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