xmlsitemap_term.module is enabled but there are no terms in sitemap.xml. What's wrong?

Comments

avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)

Do you get any error messages that could make understand what is wrong?

timonweb’s picture

Hi Kiam!

Nothing, except the error I get when I'm trying to launch update tool step 1 (admin/settings/xmlsitemap/tools/update):

* user warning: 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 'xn WHERE xn.nid IN ( SELECT xn.nid FROM xmlsitemap_node xn ' at line 1 query: DELETE FROM xmlsitemap_node xn WHERE xn.nid IN ( SELECT xn.nid FROM xmlsitemap_node xn LEFT JOIN node n ON n.nid = xn.nid WHERE n.nid IS NULL ) in G:\xampp\htdocs\satellite\sites\all\modules\xmlsitemap\xmlsitemap_node\xmlsitemap_node.module on line 405.

* user warning: Unknown column 'xn.changed' in 'where clause' query: SELECT COUNT(n.nid) FROM node n INNER JOIN xmlsitemap_node xn ON xn.nid = n.nid WHERE n.changed > xn.changed in G:\xampp\htdocs\satellite\sites\all\modules\xmlsitemap\xmlsitemap_node\xmlsitemap_node.module on line 420.

Maybe these errors are connected somehow.

avpaderno’s picture

Status: Postponed (maintainer needs more info) » Active

I would say those error messages are not exactly nothing. :-)

Those errors are not related with the taxonomy terms not being listed in the site map. I will open a bug report for those errors.

Anonymous’s picture

The errors listed in #2 shouldn't exist any longer; at least I have no issue. The tools update doesn't update terms because the batch operation hooks are missing. However, #366197-16: hook_cron() support for populating the database tables should help with the missing data.

avpaderno’s picture

The update tools don't update the taxonomy terms because xmlsitemap_term.module should be rewritten to not use its own database table.
Actually, xmlsitemap_term.module doesn't handle tags vocabularies correctly, as for those vocabularies hook_taxonomy() receives an array containing the tags key, while the hook implementation supposes the array keys are the IDs of the terms. It's not possible for hook_taxonomy() to obtain the IDs of the tags terms that are passed like a single string containing all the terms separated by a comma.

avpaderno’s picture

Title: There are no terms in sitemap » There are no terms in the site map
Status: Active » Closed (duplicate)

There is another report about the site map not being populated. I am setting this report as duplicate of that one.

If you still have a problem with the taxonomy terms (even now that the code is changed), please add a comment there.