Closed (fixed)
Project:
DraggableViews
Version:
6.x-3.0
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
24 Sep 2008 at 03:59 UTC
Updated:
30 Nov 2011 at 15:45 UTC
Nice module.
Just set up a test view, everything works well so far, except when I log in as anon/authenticated/non-admin and check the view, I get:
Fatal error: Cannot access empty property in \sites\all\modules\draggableviews\draggableviews.inc on line 173
Ticked "allow reordering" in permissions for anon/auth, but still an error.
Cheers
Comments
Comment #1
meppy commented+1 on that for me to but with a slight variation.
I have a role called Author and they get the following error:
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT parent_nid, collapsed FROM draggableviews_collapsed INNER JOIN node_access na ON na.nid = n.nid WHERE (na.grant_view >= 1 AND ((na.gid = 0 AND na.realm = 'all') OR (na.gid = 2 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = 4 AND na.realm = 'node_privacy_byrole_role') OR (na.gid = 9 AND na.realm = 'node_privacy_byrole_user') OR (na.gid = 2 AND na.realm = 'term_access') OR (na.gid = 4 AND na.realm = 'term_access'))) AND ( uid = 9) in /home/foobar/public_html/drupal/sites/all/modules/draggableviews/draggableviews_theme.inc on line 321.
Drag and drop does not work for any users in that role, despite being given the permission. I have already removed and uninstalled and reinstalled the module which fixed problems I had for Admin but now this.
Administrator originally could drag and drop without problems but now it doesnt work for them either! If I create a new user with the Admin role then they get the error as above:
Fatal error: Cannot access empty property in \sites\all\modules\draggableviews\draggableviews.inc on line 173
It all used to work perfectly before the changes to Views API, etc. So I presume it's something simple somewhere (hope!)
I am happy to donate/sponsor this module if this helps get a resolution faster :)
Seems to be permissions based issues somehow?
Comment #2
meppy commentedUnsure if it is relevant but the draggableviews_collapsed table has zero rows in my database. Looking at the code that causes the problem it seems like that needs to be different somehow?
Comment #3
meppy commentedPART SOLVED: I have resolved all of these problems except for the Cannot access empty property error.
1. I had the Weight field hidden from the view which was preventing everyone from dragging and dropping. I un-hid this.
2. I had to enable the permission: Administer Nodes
Once I did this I was able to drag and drop as the site Admin and as Author. However if I made another member an Admin they still get the Fatal error above.
Sorry for the diversion but others may find my experiences helpful with solving their problems.
Comment #4
sevi commentedTry this:
I released a development version at http://ftp.drupal.org/files/projects/draggableviews-6.x-3.x-dev.tar.gz
I changed the "administer nodes" permission to "Allow reordering" permission. Now all user with "Allow reordering" checked should be able to drag nodes.
I think the
user warning: Unknown column 'n.nid' in 'on clause' query: SELECT parent_nid, colla...was caused by the nodeaccess module on your system i unintentionally invoked. I fixed it now. Thanks for reporting this.Since I was not able to reproduce the
Fatal error: Cannot access empty property in \sites\all\modules\draggableviews\draggableviews.inc on line 173I added some debug code that should output important information for the next time the error occurs - hope so :)Comment #5
dydecker commentedHi Sevi,
I installed the dev version above, and set up a simple view with imagefield. Everything is fine for admin, but the page doesn't load for non-admin roles. I toggled "administer nodes", "allow reordering" for these roles, but no effect. Error is:
Fatal error: Maximum execution time of 60 seconds exceeded in \4\includes\common.inc on line 586
This is the error message.
An error occured. Please send this output to the maintainer:
Array ( [order] => Array ( [fields] => Array ( [0] => Array ( [field_name] => field_weight_level1_value [real_field_name] => [field_alias] => [field_type] => [minimum_value] => ) ) [visible] => [minimum_value] => ) [nodes] => Array ( ) )
Comment #6
sevi commentedMmm.. there must be some modules that constrict views or cck access.
At the moment I can't do anything, because I still couldn't reproduce the error. But I really would like to :)
May you send me a list of all installed modules on your system?
greetings,
sevi
Comment #7
dydecker commentedI managed to fix the error. It came from incorrect Content Permissions settings.
If you use Draggable Views with CP, you must enable "view" and "edit" for all fields (including weight field) for roles that have "Allow Reordering" ticked. If Allow Reordering is not ticked, the role must have "View fields" permission ticked. I guess that makes sense ;)
Thanks for your help Sevi
Comment #8
sevi commentedConclusion:
Content Permissions module is likely to cause errors that need to be searched for all night long.
This will be written in documentation with fat latters :)
Comment #9
honigferd commented#7 did the trick for me aswell. Two thumbs up, watch your CCK field permissions. :)
Comment #10
williamW commentedThx mate this worked like a charm
Comment #11
boreg commentedSimply just uninstalling and re-draggableviews did the trick for me after i spend 4 hours on this :)
Comment #12
ayesh commentedContent Permissions was the real problem (in my stack).
Thanks dydecker.