Hi there.. after installing XML SiteMap 5.x-1.3 on a site using the latest Pathauto module, the generated sitemap.xml shows http://example.com/node/[nid] for all but one node which was created before the install of the XML Sitemap module. All nodes on this particular site have a working alias, implicitly or through Pathauto.
Re-saving nodes which still show in sitemap.xml with node/nid has no effect. Disabling, uninstalling, and reinstalling XMLSitemap has no positive effect. Running update.php (for no good reason) has no effect.
New nodes created after install *do* show up in sitemap.xml with the appropriate alias.
After install, two nodes show up in xmlsitemap_node, though only one shows the appropriate alias. After creating a new node, there are three entries in xmlsitemap_node. I suspect all nodes need to be in this table in order to display the appropriate alias in the generated sitemap.xml?
After creating a new node, which displayed correctly in the sitemap, uninstalling and reinstalling all XML Sitemap modules causes only the one original node to be displayed with the proper alias again (with the same two nodes listed in xmlsitemap_node again). Once again, any new nodes created from this point forward will be displayed with the correct alias. This tells me the state of XML Sitemap after install is always constant, if not correct for this site.
After install the module weights are as follows:
xmlsitemap.module 0
pathauto.module 1
xmlsitemap_node.module 2
The previous fix which applied to gsitemap was to adjust the module weights, along with performing an edit/save on each node. With the current changes to the module, is there a new procedure which will resolve this issue for all old nodes?
Best Regards,
Damian
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | xmlsitemap_node_comment_count.diff | 599 bytes | dboune |
Comments
Comment #1
dboune commentedChecking back after a while, now all but the most recently created node shows up without it's alias.
Comment #2
darren ohDuplicate of issue 191991.
Comment #3
dboune commentedAdding for my own records..
At this time zero nodes show the appropriate alias. Absolutely no work has been performed on the afflicted site. Zero nodes have been modified, added, or deleted.Must have been sleepy.. correction, one node still retains an appropriate alias.
Comment #4
dboune commentedCompletely cleared XML Sitemap out.. reinstalled.
All nodes show as node/nid. Noticed that during install, only nodes that have had comments are added to the xmlsitemap_node table.
Modified and ran the following query from xmlsitemap_node.install (removes dependancy on a node having comments)
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
LEFT JOIN url_alias ua ON ua.src = CONCAT('node/', n.nid)
LEFT JOIN xmlsitemap_node xn ON xn.nid = n.nid
WHERE xn.nid IS NULL
GROUP BY n.nid
Delete the sitemap cache from files/xmlsitemap.
Now all nodes show with appropriate aliases.
Next I will check for behavior on node add, modify, etc...
Comment #5
dboune commentedSo far so good.. after numerous node add/modify/delete operations, including changing sitemap priority, manual cron execution, deletion of the sitemap cache, I have not so far been able to break the display of the appropriate node aliases.
Looks like the only issue I've run up against was the condition on install that nodes have comments in order to be added to the xmlsitemap_node table. I will continue to monitor, and if I run up against any other related issue I'll post again.
Is this still a duplicate to 191991?
Comment #6
darren ohYes. That issue is a bit of a mess, since the owner wasn't willing to limit it to one bug.
Comment #7
dboune commentedReviewing the SQL in xmlsitemap_node.install, it appears that if the s.comment_count field is NULL, the node will be excluded. That particular case isn't captured by (s.comment_count <= 1).
Needs "OR s.comment_count IS NULL"
I don't know if there is a reason for this not being included in the SELECT statement. I've attached a diff just in case this helps in some way.
Changed title to reflect real issue.. attached patch, changed status to "patch (code needs review)"
Comment #8
dboune commentedChanged to bug report..
Sorry about the naming of the above diff. Should have been xmlsitemap_node.install.null_comment_count.diff
Comment #9
dboune commentedI see.. Ok, well... hopefully we can get those issues pruned off.
Comment #10
dboune commentedI'm just all over the place today... :(
Comment #11
dboune commentedbrain train disconnection... ignore this comment.
Comment #12
darren ohThe patch for issue 195124 should fix this.
Comment #13
dboune commentedWhat software are you using to generate your patches? Looks like a good way to go.. at the moment I still fuss around on the command line running diff by hand.
Comment #14
darren ohI use CVS to generate diffs against the version in the CVS repository.
cvs diff -upN
Comment #15
dboune commentedahh.. ok.. :) I really should set myself up an appropriate environment.
I will see if I can test that other patch against postgres this afternoon.
Comment #16
darren ohBased on issue 198746, I gather that the patch for issue 195124 did fix this problem.
Comment #17
(not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.