Hi,

I probably did a stupid thing and loaded the 2.x-dev version from scratch into a new site. Activating the module did not create the main xmlsitemap table, so I got loads of error messages. I'm now going to try the beta version :-)
Hope this helps, cause this sounds like a really useful module and I really want to try it out.

Comments

dave reid’s picture

Wait, did you have any previous versions of XML sitemap used at any time on this site? Because if you did and they weren't properly uninstalled with admin/build/modules/uninstall, the install routines aren't going to work properly. The 6.x-2.x works just fine if it is truly a clean install.

avpaderno’s picture

Title: xmlsitemap table not created » xmlsitemap table is not created

What does "loaded from scratch" mean?

alpirrie’s picture

It was a clean install of a new site - drupal 6.12 (at the time). I just added the dev package into sites/all/modules and ticked the 'XML sitemap' and 'XML sitemap node' options in admin/build/modules. I then kept seeing loads of database errors saying that the xmlsitemap table was missing - especially when I ran update.php.

The beta installed ok, but the node sitemap is throwing the following error on cron:

user warning: Unknown column 'xn.nid' in 'where clause' query: SELECT n.* FROM node n LEFT JOIN xmlsitemap_node xn ON xn.nid = n.nid WHERE xn.nid IS NULL AND n.status <> 0 LIMIT 0, 100 in ......./sites/all/modules/xmlsitemap/xmlsitemap_node/xmlsitemap_node.module on line 71.

Looking at the 'xmlsitemap_node' table in my database the column it's probably referring to is mid. Should I change the column name to nid, or the line in xmlsitemap_node.module?

Cheers)

alpirrie’s picture

I changed the column 'mid' to 'nid' and ran cron. I then received errors about duplicate pdata values. I think my xmlsitemap_node table is messed up. Here's the table structure. Can you please let me know what it's supposed to be....

nid 	int(11) 
pdata 	int(10) 
sdata 	int(10) 
language 	varchar(12) 
status 	int(11) 
previously_changed 	int(10) 
changed 	int(10) 
priority 	float 
priority_override 	float 
comment_ratio 	float 


PRIMARY 	PRIMARY 	nid
link_pdata 	UNIQUE 	pdata
link_language 	INDEX 	language
link_status 	INDEX 	status
link_changed 	INDEX 	changed
link_priority 	INDEX 	priority

Thanks so much!

alpirrie’s picture

I uninstalled the module and reloaded it and the table is fine. I hadn't uninstalled the dev version before installing the beta version, so that's probably how the table got its extra fields...

It's now working fine. Great module. Thanks.

dave reid’s picture

If you had an xmlsitemap_node table, this was definately not a clean install. That table is from the 6.x-1.x versions or before. It has never been in the 6.x-2.x version and neither has the column mid. I recommend that you disable all the XML sitemap modules, then uninstall them at admin/build/modules/uninstall, and then go in your database and make sure there are no tables that start with xmlsitemap.

avpaderno’s picture

I agree; pdata was one of the fields I used in my code, which was not the 6.x-2 branch.

dave reid’s picture

Status: Active » Fixed

Original problem has been solved since this wasn't a fresh install, so marking as fixed.

Status: Fixed » Closed (fixed)

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