Closed (fixed)
Project:
ACL
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
13 May 2010 at 16:38 UTC
Updated:
8 Jul 2010 at 19:30 UTC
Updated :
Removed all the db_result queries and replaced them with valid D7 code
Removed all the db_fetch_array and replaced them with valid D7 code
Converted the priority from an array based system to the D7 object system
| Comment | File | Size | Author |
|---|---|---|---|
| drupal7_adjustments.patch | 3.12 KB | nick_vh |
Comments
Comment #1
salvisGreat, thanks!
This looks good, except for:
What do you mean with this comment?
Comment #2
nick_vhI don't know anymore.. I guess it was a pointer for me that that query didn't work before. You can safely ignore that.
More updates will come soon together with their corresponding tests :-)
Comment #3
salvisOk, I dropped the comment and committed everything else, thanks!
http://drupal.org/cvs?commit=367706
Comment #4
BenK commentedJust tracking this thread...
Comment #5
salvisThis thread is done, but you might help with testing...
Comment #6
BenK commentedI'd be glad to help with testing, but most of my use of ACL has been in conjunction with the Content Access module. As far as I know, there hasn't been any work on a Content Access D7 port yet.
I suppose one possibility would be to run Coder Upgrade on Content Access and see what happens... but I'm not sure of how close that would get me.
--Ben
Comment #7
salvisLast time I used Coder Upgrade it didn't do anything to the database calls, so there's a lot of additional manual work, but anything that brings a module closer to D7 is helpful.
Comment #9
BenK commentedHey everyone,
salvis suggested I reopen this thread. I just tried using ACL in conjunction with the D7 version of the Content Access module, but I got a white screen of death when trying to display the "Access control" tab of a given node. Looking in the error logs, this was the error message:
PHP Fatal error: Call to undefined function db_result() in /home/sandboxes/sandbox10/public_html/sites/all/modules/contrib/acl/acl.admin.inc on line 16, referer: http://sandbox10.testsite.org/node/2
Any thoughts on how to fix?
Thanks,
Ben
Comment #10
BenK commentedHey salvis or Nick_vh,
Any idea how to solve the issue posted in #9?
Thanks,
Ben
Comment #11
BenK commentedComment #12
salvisPlease try this:
Comment #13
BenK commentedHey salvis,
I tried your fix in #12 and now I'm getting the following error message:
PDOException: SQLSTATE[HY000]: General error: 1366 Incorrect integer value: '' for column 'grant_update' at row 1: INSERT INTO {acl_node} (acl_id, nid, grant_view, grant_update, grant_delete, priority) VALUES (:db_insert_placeholder_0, :db_insert_placeholder_1, :db_insert_placeholder_2, :db_insert_placeholder_3, :db_insert_placeholder_4, :db_insert_placeholder_5); Array ( [:db_insert_placeholder_0] => 1 [:db_insert_placeholder_1] => 1 [:db_insert_placeholder_2] => 1 [:db_insert_placeholder_3] => [:db_insert_placeholder_4] => [:db_insert_placeholder_5] => 0 ) in acl_node_add_acl() (line 96 of /home/sandboxes/sandbox10/public_html/sites/all/modules/contrib/acl/acl.module).
Any ideas?
Thanks so much for your help,
Ben
Comment #14
salvisThis is a bug in Content Access: #824642: D7: Error Message When Viewing a Node's "Access Control" tab (ACL with Content Access module). It fails to pass the required 0's and pgsql stubbornly refuses to make trivial type conversions (which is a bug in pgsql IMO).
Actually, it was you who reported that other issue...
I believe that code should be reasonably robust against misbehavior of others and I committed a work-around to the ACL -dev version a week ago. So, update ACL and re-apply #12...
Comment #15
BenK commentedHey salvis,
Oops, my mistake. I had overwritten the suggested change in #824642 inadvertently. Once I put that fix back in, I was able to load the "Access Control" tab successfully and see the "User access control lists" section at the bottom. Sorry about that. Thanks again for your help.
So I've confirmed that your change in #12 works perfectly. Can you commit #12 as soon as you have a chance? We're making progress!
Moving on with testing, I actually tried to add a user to an ACL, but the "Add user" button didn't seem to work (the page reloads, but nothing happens). After a few times of attempting this, an "Integrity constraint violation" error message is shown. I will post a new issue thread about this....
--Ben
Comment #16
salvisCommitted to the -dev version. Give it up to 12h to be repackaged.
Thanks!