I initially installed 6.x.1 and removed it due to performance issues ( i have > 30k nodes and update daily). I setup the content types i wanted to include as well as the menu ( primary ) i wanted as well. I tested it out first on the menu which seemed to work fine resulting in 5 entries for my 5 menu links. However when I try to rebuild including the nodes it takes about 5 mins to process but my sitemap stays exactly the same. I even tried deleteing the cached xmlsitemap-en-0.xml file file in the xmlsitemap directory as well as running cron a number of times... any ideas? Am i just configuring this wrong? I had minimum cache set to 1 day initially and reverted it back to none which had no effect.

Comments

avpaderno’s picture

Category: bug » support
malukalu’s picture

Uninstalled and checked to make sure that there where no tables that started with xmlsitemap. renebled the node and menu xmlsitemap modules and removed the relevant content types in the settings. Hit rebuild and watched it take another 5 mins to generate only to find that the sitemap.xml still only has the 5 entries in it for the menu links. The xmlsitemap table itself has over 25k rows in it...

avpaderno’s picture

Status: Active » Postponed (maintainer needs more info)

May you report the five entries you see in the sitemap (it's fine if you hide the domain name of the web site, but leave the rest of the URL intact)?

dave reid’s picture

Priority: Critical » Normal
Status: Postponed (maintainer needs more info) » Fixed

The manual rebuild, which is an expensive process and shouldn't normally be used, still generates data for all your content unless you select certain modules to rebuild. If you selected your content to not be included but then later decided to include a certain content type, all the module needs to do is flip the 'access' column for those content type's link data and they're ready to go then next time the sitemap is generated. Otherwise, if that data wasn't already available, you would have to wait for that content to be re-indexed again. This is just how the system works right now.

malukalu’s picture

KiamLaLuno - The five links where the base domain, /movies, /dvds , /exclusives and /win

What do you mean when the content is re-indexed? I have search disabled on my site as i'm serving it through a solar instance. Not sure if i understand what i need to do now to get it to show up. Is there something i can check in the DB to verify ?

avpaderno’s picture

I think Dave means re-index by XML sitemap; the module doesn't use the search module to index its data.

malukalu’s picture

Gotcha, when/how does that happen? As part of cron runs? Its been a few days and I run cron nightly so should i expect to see something by now?

malukalu’s picture

Status: Fixed » Active
dave reid’s picture

Status: Active » Postponed (maintainer needs more info)

Can you try with the latest 6.x-2.0-unstable1? What I'd do is:
- Make sure you run update.php first with the new version.
- Make sure your content types are set to be included
- Make sure the nodes you want included are actually visible to anonymous users (can you log out and view them all?)
- Set your sitemap minimum lifetime to No minimum
- Run cron a few times. Make sure there were no errors from cron.
- Check your site's /sitemap.xml. Is any content there?

malukalu’s picture

I think my problem is that im using the Domain access module. All my nodes that end up in the xmlsitemap table after regenreating the sitemap through the UI have access=3 ( and status=1). Actually one specific content type has access=2 as well which is strange however these nodes were created by the system as part of a custom module so perhaps that is why they are particularly different.

I basically updated the table to set access=1 where access=3 and status=1 and that seemed to get it to all to work. Im not sure however if when new content is added if these will come in with access=3 as well ( which would require me to update the table again ).. Running cron obviously generates the new sitemap with the correct links once this is done..

Is there something i can check to see why access is being set to 3? Is this because of domain access?

dave reid’s picture

Assigned: Unassigned » dave reid
Category: support » bug
Status: Postponed (maintainer needs more info) » Fixed

Aha, yes I think I might know what the problem is. XML sitemap node uses node_access('view', $node, drupal_anonymous_user()). The API docs for node_access() say that "TRUE if the operation may be performed." My guess is that Domain access returns a value of 3 from node_access(), which still evaluates to TRUE, but we don't cast it to a boolean.

Or more possibly, this section from node_access() is returning a count of 3:

    $sql = "SELECT COUNT(*) FROM {node_access} WHERE (nid = 0 OR nid = %d) $grants_sql AND grant_$op >= 1";
    $result = db_query($sql, $node->nid);
    return (db_result($result));

I committed a fix to xmlsitemap_node to cast the result of node_access() to a boolean which should just limit it to just 0 and 1. I'm also going to file a bug report for Drupal core about this.

Status: Fixed » Closed (fixed)

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