When a node is not assigned any term (for example, a blog entry), it fails to show up for any users.
It turned out that the DB retrieval method (mysql) was not correct in taxonomy_access.module: on line , I changed "db_fetch_array" to "db_fetch_object" (just as is done for the "node assigned to a category" just below, which does work). The node_access table is now updated correctly.
I haven't tested the system extensively yet, so please report any potential problems this change could raise (I am pretty confident however since the original code uses db_fetch_object successfully below, as noted above)
HTH
Bruno
Comments
Comment #1
(not verified) commentedSorry -- that was line 267
Comment #2
pyromanfo commentedAre you seeing this in the latest CVS? I don't think this should be happening with the latest version.
Comment #3
(not verified) commentedIt's me again (i'll register on drupal.org, that'll make things easier!)
I downloaded the taxonomy_access module from here on March 29th, so I guess this is a fairly recent version.
As for my Drupal installation, I am using the Debian unstable package so this might not be bleeding edge, but i do not think his has any influence in this case?
Comment #4
Justin Freeman commentedI am experiencing this bug also. The only work-around I've found is to create a general "All" term and assign nodes to that term. Otherwise, nodes not assigned to any term will be denied access to anonymous users, regardless of the permission settings.
We are using Drupal 4.5. Would be good to get a fix to this problem soon.
Comment #5
Justin Freeman commentedJust noticed that if I go to the "category permissions" page and disable and then enable the anonymous user to view "uncategorized nodes" the permissions are set correctly and the page can be viewed.
So it appears to be something caused by the node be edited and submitted, the permissions for the node being calculated incorrectly somehow.
Comment #6
Justin Freeman commentedThis change to the taxonomy_access.module seems to have fixed this problem. Changes start on line 265.
Comment #7
keve commentedThis is weird, becuase acc. to php manual:
Considering If(!$tids)
the following values are considered FALSE:
the integer 0 (zero)
an array with zero elements
the special type NULL (including unset variables)
For me, (!$tids) and ($tids==null) seems to be the same. {Unlike ($tids===null)}
http://www.php.net/manual/en/language.types.boolean.php#language.types.b...
Comment #8
keve commentedIt is fixed with latest versions. (It was a problem in the hook_nodeapi)