I was waiting for a new uptade before posting. I tried the last snapshot of the module published on the 2007-Nov-22. The bug is still there for me.
I hope this report won't be marked as fixed or duplicate too quickly this time.
Ronan

Comments

darren oh’s picture

Status: Active » Postponed (maintainer needs more info)

I couldn't reproduce this on either the 5.x-1.3 or the 5.x-1.x-dev demo site. There's not enough information here to fix anything.

rondev’s picture

There's not enough information here to fix anything.
What kind information do you need? As I don't know I cant help. If you think my posted issue is not valuable, you may ignore what I say. Perhaps someone more qualified here could help you.
Ronan

darren oh’s picture

Category: bug » support

You can

  1. Try to reproduce the problem on the demo site.
  2. Try to reproduce the problem on a clean Drupal install on your own server.
  3. Post the record of a problem node from the xmlsitemap_node database table.

Also, filing bugs against the development version makes it harder to help you, since the code is unstable. Development versions should only be used to check fixes for bugs in the latest official release.

hass’s picture

Category: support » bug
Status: Postponed (maintainer needs more info) » Active

Same issue here with v1.3. I set 4 nodes to "Not in site map" the priority_override value has changed to "-1" in DB, but the node is nevertheless listed in sitemap.xml. Aside the xmlsitemap_node.PID is set to NULL. I think it should be 0... or better to say there seems to be inconsistencies... as reported in http://drupal.org/node/191991

hass’s picture

Status: Active » Needs review
StatusFileSize
new1.02 KB

Patch to fix this bug is attached.

I have tested with 'page', 'story' only and both together excluded and additional with some nodes that have priority -1. All have worked well.

hass’s picture

Same bug is inside xmlsitemap_term, too. Untested and not included in this patch.

hass’s picture

StatusFileSize
new1.98 KB

This patch should fix both submodules... but i haven't tested xmlsitemap_term myself regarding this bug, yet.

hass’s picture

Aside, someone should check xmlsitemap_user... i'm not using this submodule and the SQL looks different. Code looks like a possible "0" vesus "NULL" problem... but not sure.

darren oh’s picture

Version: 5.x-1.x-dev » 5.x-1.3
Status: Needs review » Needs work

The patch prevents nodes whose type is excluded from overriding that exclusion. I still can't reproduce the problem. This is how it works for me:

  • If I set a node type priority to "Not in site map", nodes of that type whose priority is set to "Default" do not appear in the site map. Nodes of that type whose priority override is set anything other than "Default" or "Not in site map" do appear in the site map.
  • If I give a node type a priority from 0 to 1, nodes of that type whose priority set to appear unless their priority override is set to "Not in site map".

As far as I can tell, the module is working as designed.

hass’s picture

Status: Needs work » Needs review

Uhhh... no - i get the idea behind, but this is not logic from usability and totally intransparent to users. If this is the way how the module is "designed" you should rethink this illogical part and commit this patch.

1. Think about a tree view logic:
"Do not show node stype in sitemap"
--> "Do not show individual node in sitemap"

All defaults to "show in sitemap", what we could expect if someone installs xmlsitemap.

2. please keep in mind - i have over 100.000 nodes and i cannot look inside every node by hand. I cannot check every story of the priority match the default value or have in individual value that may drop some nodes from the sitemap or not. If i say "do not show stories" - NO story should be visible and not only the one that have a default value set. Maybe i change the default priority for stories from 0.1 to 0.5, but have them set to "do not show in sitemap" and then my nodes with 0.5 are no more displayed!? How strange is this...

3. If i'm higher in the tree this should overrule lower values and not mix them up - sometimes so and sometimes so. It is a general decision to not show a node type. If someone don't like to show his stories he should be aware they are no more displayed. If he want them back showing we could enable this node type to be displayed.

I would recommend users are staying at gsitemap for now until such and some other bugs and usability hassles are fixed. I'm thinking of going back or keep staying there for now, too.

darren oh’s picture

Status: Needs review » Closed (works as designed)

gsitemap was also designed to allow the priority to be overridden for individual nodes. It's quite clear that the node type priority is only the default priority for nodes.

I moved the code for node URLs into the xmlsitemap_node module so that you can easily replace it with your own module if you do not like how it works.

darren oh’s picture

By the way, from one of your posts in another issue, I think your problem is that you set the priority_override for all your nodes to 0. To use the default priority, it must be null.

hass’s picture

Status: Closed (works as designed) » Active

I tried both 0 and NULL. NULL gave me *nothing* in the sitemap.xml and not the default value (BUG). The value 0 on the other side worked correctly. I haven't had time to review all of this bugs, but this is not correct behavior.

About the exclusion it was required to use 0 or the filter xt.priority_override >= 0 will not match! Without the above patch it is not possible to exclude nodes.

I tried to exclude 5 nodes and set them to "do not display in sitemap", but nevertheless of this individual setting the node was shown. Please don't tell me this "by design" to ignore this individual node setting if the node type will be displayed by default.

darren oh’s picture

Status: Active » Postponed (maintainer needs more info)

You must be using a patched version of the module. It works perfectly for me. Please see if you can reproduce the bug on the official demo site.

hass’s picture

Status: Postponed (maintainer needs more info) » Active

No. This is a test with unpatched and buggy version 1.3. The following is the MySQL line of "node/4".

4, NULL, 1195859221, 1163089066, NULL, -1, -1

This is a story and story node type is not excluded from sitemap. The individual node/4 have priority_override = -1 and therefor should not be displayed in sitemap.xml, but it is. The patch in #7 fixes this bug.

hass’s picture

Status: Active » Needs work

Patch needs work for situation where priority_override = NULL

darren oh’s picture

Status: Needs work » Postponed (maintainer needs more info)

This may not even be a bug. Please try to reproduce the problem in the standard environment provided by the demo site. You will find links to the demo sites at http://xmlsitemap.darren.oh.name.

If you succeed in reproducing the problem, please provide the following information:

  1. What you did.
  2. What you expected to happen.
  3. What actually happened.
hass’s picture

This is not helpful... how can i look inside the DB and delete the sitemap tar file?

hass’s picture

Status: Postponed (maintainer needs more info) » Active

OK, reproduced this on http://xmlsitemap.darren.oh.name/5.x-1.3/?q=en/content/asdad

1. Simply create a story (content/asdad)
2. set the story to not display in sitemap
3. reload sitemap.xml

Site map URL	Last modification date	Change freq.	Priority
http://xmlsitemap.darren.oh.name/5.x-1.3/		always	1.0
http://xmlsitemap.darren.oh.name/5.x-1.3/?q=users/admin	2007-11-25T19:14:42+00:00	always	0.1
http://xmlsitemap.darren.oh.name/5.x-1.3/?q=content/asdad	2007-11-25T19:16:31+00:00	always	

The last entry shouldn't be there.

darren oh’s picture

Status: Active » Postponed (maintainer needs more info)

It's a new, clean Drupal install with no users, created with an installation profile that enables XML Sitemap and related modules. Just create an account.

darren oh’s picture

Thank you. I will investigate.

dublin drupaller’s picture

very useful module. great work.

I'm experiencing the same problem with the latest 5.x-1.3 version (Nov 26th). Just flagging that it's still an issue and will try the patches posted earlier.

Dub

dboune’s picture

The attached patches resolving the aforementioned priority exclusion issues for nodes and terms. NULL values are handled.

In the long term, the use of NULL should probably be done away with.

I have NOT looked into the user module yet.. but will in a few.

dboune’s picture

Status: Postponed (maintainer needs more info) » Needs review

changing to patch (code needs review)

hass’s picture

I think this like is wrong... haven't tested this again, but think about what will happen here:

(n.type NOT IN ('". implode("', '", $excludes) ."') OR xn.priority_override >= 0)

1. we have an exclude 'page'
2. this should cause 'page' to not show in sitemap...
3. if this have a value higher then 0 it will be displayed. I remember - Darren wants this - however i hate this very much, while i have removed all 'page's on global level and nevertheless someone have set a higher value of some pages to more then 0 in past... but today our decision is to remove all 'page's and not to show them.
4. if xn.priority_override = NULL, this should cause a fall back to "default" value. If this default value is higher then 0 the page will be displayed... very confusing... it sounds i'm may be wrong here.

5. the following would cause NULL value links to show in sitemap... but what is about a default value of "-1" ? This should cause no links to show...
AND (xt.priority_override IS NULL OR xt.priority_override >= 0

I have some troubles to follow the NULL part without using IFNULL/ISNULL and this confusing illogical parts...

dboune’s picture

@hass

(n.type NOT IN ('". implode("', '", $excludes) ."') OR xn.priority_override >= 0)

The above statement only affects note type excludes, not page excludes. I should add that it does effect implicit page (node) includes when the node type has been excluded.

AND (xt.priority_override IS NULL OR xt.priority_override >= 0

The above allows anything except nodes with a priority of -1 to show in the sitemap. "Not in site map" is a synonym for the priority value of -1.

Overall, both condition sets must be satisfied for an item to show in the sitemap. So if a node is excluded by it's node type in the first statement, then the second statement has no real effect.

Case scenarios:

Node Type Exclusion
Page is set to Default (NULL): Statement1= FALSE && Statement2 = TRUE - Node is excluded.
Page is set to non-default: Statement 1 is TRUE && Statement 2 = TRUE - Node is implicitly included.

Node Exclusion (Node type is !not! -1)
Page is -1: Statement1 = TRUE && Statement2 = FALSE: Node is excluded
Page is != -1: Statement1 = TRUE && Statement2 = TRUE: Node is included

hass’s picture

"page" is a "node type"

dboune’s picture

Yes, I realize that.. using the word page in this context is just a handy way of not confusing Node Type and Node. Sorry..

dublin drupaller’s picture

Just updating this thread...

I tried the patch provided by dboune (post #23) for the xmlsitemap_node.module and it worked for me.

i.e. it correctly excluded "Not in site map" nodes from the site map.

thanks dboune.

Dub

darren oh’s picture

Status: Needs review » Fixed

Fixed in CVS commit 90807.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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