After logging out I cannot surf my own site as an anonymous visitor. I get access denied messages everywhere. I can login again, but when I log out the whole thing starts anew. My other authenticated user has exactly the same problem. It appears that 'regular' anonymous visitors do not experience the problem, it only seems to happen when you want to assume the anonymous rol by logging out.
Now I have found a patch for 'system.install' that I paste below.
The strange thing is, that when I check into 'system.install' the lines that tell the db to create the 'DRUPAL_Anonymous_RID' are allready there, but my role table still has the 'old' 'anonymous user'
Apparently the system install file didnt execute properly. Or the host didnt accept it?
My question: can I safely change those records manually in the role table? (And the permissions table, though I do not yet know whether that is necessary)
Many thanks
Theo Richel
Index: modules/system/system.install
===================================================================
RCS file: /cvs/drupal/drupal/modules/system/system.install,v
retrieving revision 1.77
diff -u -p -r1.77 system.install
--- modules/system/system.install 10 Feb 2007 15:39:17 -0000 1.77
+++ modules/system/system.install 11 Feb 2007 18:15:12 -0000
@@ -1089,8 +1089,8 @@ function system_install() {
db_query("INSERT INTO {users} (uid,name,mail) VALUES(0,'','')");
- db_query("INSERT INTO {role} (name) VALUES ('anonymous user')");
- db_query("INSERT INTO {role} (name) VALUES ('authenticated user')");
+ db_query("INSERT INTO {role} (rid,name) VALUES (".DRUPAL_ANONYMOUS_RID.",'anonymous user')");
+ db_query("INSERT INTO {role} (rid,name) VALUES (".DRUPAL_AUTHENTICATED_RID.",'authenticated user')");
db_query("INSERT INTO {permission} VALUES (1,'access content',0)");
db_query("INSERT INTO {permission} VALUES (2,'access comments, access content, post comments, post comments without approval',0)");
Comments
It should not be necessary
It should not be necessary to edit either the {users} table or the {permission} table.
What version of Drupal are you running? And where did the code come from?
Try emptying your browser cache and deleting cookies. May not help but an important thing to try first.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk
Solved
I had used the Simple Access module. After uninstalling it is apparently necessary to rebuild node persmissions (Content Management-Post Settings). That did it.
Thanks
Yes, that's often necessary
Yes, that's often necessary when enabling or disabling a node access module, in D5 at least.
gpk
----
www.alexoria.co.uk
gpk
----
www.alexoria.co.uk