Postgres incompatibility issues completely killed non-admin access, even after removal

Zed Pobre - March 10, 2005 - 07:10
Project:Taxonomy Access Control
Component:Code
Category:bug report
Priority:critical
Assigned:Unassigned
Status:closed
Description

I'm getting:

warning: array_key_exists(): The second argument should be either an array or an object in /usr/local/share/drupal-4.5.2/modules/taxonomy_access/taxonomy_access.module on line 780.

in my logs. Attempting to access any node as an anonymous user gets you permission denied. As my administrative account, I can see everything just fine.

I originally started with the 4.5.0 version, modified the .mysql file for postgres syntax, installed, saw the errors in the logs, figured it wasn't ready yet, and turned the module off again. I didn't realize at the time that I had just incapacitated my site. Some time later, after having made another update, I logged out to discover that my site (http://www.resonant.org/) was basically inaccessible. I have since tried reactivating the 4.5.0 version, deleting the information in node_access and term_access, and deleting term_access completely and installing the version from CVS. Nothing has gotten me up and working again. My last backup doesn't contain the large entry I just made.

HELP!

#1

Zed Pobre - March 10, 2005 - 07:40

Some of the error messages appear to be related to two things: use of an unportable (and unnecessary, as far as I know) WHILE 1 condition, and use of the unportable and very nonstandard REPLACE INTO command.

#2

Zed Pobre - March 10, 2005 - 07:48

Whee, I managed to get the system working again by manually running:

INSERT INTO node_access VALUES (0, 0, 'all', 1, 0, 0);

I've changed the matching area around line 577 to read:

db_query("DELETE FROM {node_access} WHERE nid = 0 and gid = 0 and realm = 'all'");                                                      
db_query('INSERT INTO {node_access} VALUES (0, 0, \'all\', 1, 0, 0)');                                                                  

This is standard SQL that should work about the same as the nonstandard REPLACE command to prevent heart attacks.

I still need to test authenticated, non-admin users.

#3

Zed Pobre - March 10, 2005 - 07:50
Title:array_key_exists bug completely killed anonymous access» Postgres incompatibility issues completely killed non-admin access, even after removal

Additional note: before this, I had also just mass-replaced the REPLACE INTO commands with INSERT INTO, on the assumption that getting ANY valid setup into place is preferable to the utter wipeout that resulted from this little experiment, even if subsequent modification was broken.

I'm not sure how much more manual tweaking would have been required otherwise.

#4

pyromanfo - April 1, 2005 - 02:49

The latest code in CVS should be Postgres compatible, let me know how it works.

Sorry for the delay in getting back to you.

#5

Zed Pobre - April 13, 2005 - 18:04

I see from the CVS commit messages that you've moved on to 4.6. Will the CVS version still work with 4.5.2?

#6

pyromanfo - April 13, 2005 - 18:06

The last 4.5.2 version is in the 4.5.2 subdirectory in CVS.

#7

Zed Pobre - September 11, 2005 - 05:46
Status:active» fixed

Well, I finally upgraded to 4.6.3 and gave this another try. It no longer self-destructs on removal, but it's still causing the term node counts bug, so I had to leave it disabled again anyway, unfortunately.

#8

Anonymous - September 25, 2005 - 07:01

#9

Anonymous - October 9, 2005 - 07:01
Status:fixed» closed
 
 

Drupal is a registered trademark of Dries Buytaert.