I am getting the following error when /sitemap.xml gets accessed. This started happening right after I updated to the latest 6.x-1.x-dev (datestamp 1226967380):

user warning: Table 'db.xmlsitemap' doesn't exist query: SELECT * FROM xmlsitemap ORDER BY lastmod DESC, changefreq, priority DESC, loc LIMIT 0, 50000 in /.../sites/all/modules/xmlsitemap/xmlsitemap.module on line 474.

I don't see a definition for this table (db.xmlsitemap) in xmlsitemap.install, nor any SQL write queries against that table. The end result is that /sitemap.xml is truncated after </urlset>

CommentFileSizeAuthor
#5 xmlsitemap.install.patch535 bytesclaudiu.cristea

Comments

avpaderno’s picture

Title: Error when requesting sitemap.xml: table db.xmlsitemap doesn't exist » Table xmlsitemap doesn't exist
Assigned: Unassigned » avpaderno

In the code, the table is being referred like {xmlsitemap}, and effectively it is not being installed from 6.x-1.x-dev.
The code is being ported from 5.x-2.x, and could present some problems, at the moment.

I will fix this as soon as possible.

sfranchi’s picture

Priority: Normal » Critical

Same issue.

avpaderno’s picture

Status: Active » Fixed

Fixed. Wait for the next 12 hours, before the new download will be available.

beedaddy’s picture

Status: Fixed » Active

I'm not sure if I really got the new version (but it is from Nov 20). I'm getting a similar (but not exactly the same) error as adzio:
user warning: Table 'drupal_xmlsitemap' doesn't exist query: SELECT COUNT(*) FROM drupal_xmlsitemap in /[...]/drupal/sites/all/modules/xmlsitemap/xmlsitemap.module on line 283.

claudiu.cristea’s picture

Status: Active » Needs review
StatusFileSize
new535 bytes

This happens because of an error in xmlsitemap_update_6000() function from xmlsitemap.install. The db_create_table() function is called without the second argument which is the table name ("xmlsitemap").

Attached you can find a patch to fix this issue. Apply the patch and run update.php.

beedaddy’s picture

Status: Needs review » Reviewed & tested by the community

Thanks a lot. That worked.

avpaderno’s picture

Status: Reviewed & tested by the community » Fixed

The code has been changed.
I implementated xmlsitemap_update_6101() differently, as I need that the same code is executed also for who updates the module from the version for Drupal 5.
You will find the new release in the next 12 hours.

I can say that now the module works fine.

Vinno’s picture

Just downloaded xmlsitemap again it now works but only have 1 url on the sitemap.xml and thats the main site. Do i have to somehow regenerate all the sitemaps again?

avpaderno’s picture

That is how the module works now; xmlsitemap_node must still be ported from 5.x-2.x code, so actually it doesn't do anything.
There is also another issue with the dates that seem to refer all to January 1, 1970 (the epoch time for unix time stamps).

wdrupal100’s picture

thanks! i look forward to the next build

avpaderno’s picture

Take in mind that the next build can be an intermediate building, as the porting is made in steps.

Status: Fixed » Closed (fixed)

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

avolve’s picture

Component: xmlsitemap » xmlsitemap.module
Assigned: avpaderno » Unassigned
Category: bug » support

I am posting here, as my issue might be similar/a duplicate and I have not managed to resolve it.

It is on a site upgrade from D5. I first installed the 6.x-1 version, with repeated errors, then installed the 6.x-0 version with the following error on admin/settings/xmlsitemap/additional

    * user warning: Table 'DB_NAME.xmlsitemap_additional' doesn't exist query: SELECT COUNT(*) FROM xmlsitemap_additional in EXAMPLE.COM/sites/all/modules/xmlsitemap/xmlsitemap.module on line 193.
    * user warning: Table 'DBNAME.xmlsitemap_additional' doesn't exist query: SELECT path, priority FROM xmlsitemap_additional ORDER BY last_changed DESC LIMIT 0, 50 in EXAMPLE.COM/drupal/sites/all/modules/xmlsitemap/xmlsitemap.module on line 193.

I received fatal errors on attempting to uninstall the 6.x-1 version. I have tried dropping all xmlsitemap tables, though have noted that the details for specific search engines (authorisation codes) seem to be saved in another table as they are retained in the dbase.

On attempting to update to the 6.x-1 version from the 6.x-0, i note the following in the log error

xmlsitemap_user module
Update #6000

    * Failed:
    * A
    * ALTER TABLE {xmlsitemap_user} DROP pid
    * ALTER TABLE {xmlsitemap_user} DROP PRIMARY KEY
    * ALTER TABLE {xmlsitemap_user} CHANGE uid `uid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (uid)
    * ALTER TABLE {xmlsitemap_user} CHANGE last_changed `changed` INT unsigned NOT NULL DEFAULT 0
    * ALTER TABLE {xmlsitemap_user} ADD `comments` INT unsigned NOT NULL DEFAULT 0
    * UPDATE {xmlsitemap_user} SET priority_override = -2.0 WHERE priority_override IS NULL
    * ALTER TABLE {xmlsitemap_user} CHANGE priority_override `priority_override` FLOAT NOT NULL DEFAULT -2
    * ALTER TABLE {xmlsitemap_user_role} DROP PRIMARY KEY
    * ALTER TABLE {xmlsitemap_user_role} CHANGE rid `rid` INT unsigned NOT NULL DEFAULT 0, ADD PRIMARY KEY (rid)
    * UPDATE {xmlsitemap_user_role} SET priority = 0.5 WHERE priority IS NULL
    * ALTER TABLE {xmlsitemap_user_role} CHANGE priority `priority` FLOAT NOT NULL DEFAULT 0.5
    * ALTER TABLE {xmlsitemap_user_role} CHANGE priority `priority` FLOAT NOT NULL DEFAULT 0.5

on deleting the 6.x-0 module, and replacing with the 6.x-1 version, followed by running update.php (no errors logged), I get this warning when i enable 'xml sitemap' (after the helper module), not any other other sub-modules

user warning: Table 'DB_NAME.xmlsitemap' doesn't exist query: SELECT COUNT(xsm.loc) FROM xmlsitemap xsm INNER JOIN system s ON s.name = xsm.module WHERE s.type = 'module' AND s.status = 1 AND xsm.changefreq <> 0 AND xsm.changed <> 0 AND (xsm.priority >= 0 AND xsm.priority <= 1) in EXAMPLE.COM/sites/all/modules/xmlsitemap/xmlsitemap_helper/xmlsitemap_helper.module on line 93.

I have tried to workaround this many ways, including following what others have posted...