Hi,
I have created a view-page with a table. I have added the following fields:
- Title
- Weight
- Weight selector
When I log in as an administrator I can drag and drop the rows in the table and save my changes (it works as intended). When I log in as a different user I can access the view and drag and drop the rows in the table. When I save however, the table reverts to its original form.
When I try to drag a row to a different place in the table I got the following javascript error in my browser:
TypeError: rowSettings is undefined.
Also the weight selector field is not being shown when you select show row weights when logged in as a different user. (screenshot 1: as admin, screenshot 2: as regular user)
I have also created a second user with administrator privileges, but I am having the same issue. It seems that the drag and drop functionality is only working when logged in as user/1
Comment | File | Size | Author |
---|---|---|---|
#6 | tabledrag_in_view_not-2793605-6.patch | 473 bytes | ankur.addweb |
screenshot2.jpg | 184.14 KB | wimvantomme | |
screenshot1.jpg | 165.92 KB | wimvantomme |
Comments
Comment #2
oinuma CreditAttribution: oinuma commentedDesignation of privilege has been invoked in the "views/views_handler_weight_selector.inc" file.
but it has not been set "hook_permission" the "weight.module" file.
So, to set the "hook_permission".
Set the "assign node weight" the "/admin/people/permissions" page
Comment #3
nimek CreditAttribution: nimek as a volunteer commentedThis should be marked as critical and fixed ASAP !
@oinuma - thanks for solution
Comment #4
pagecarving CreditAttribution: pagecarving commentedI used the code from #2 and it worked as stated.
@oinuma - thanks!
Comment #5
nimek CreditAttribution: nimek as a volunteer commentedUpdated issue status and title - soltion is posted in this thread.
Comment #6
ankur.addweb CreditAttribution: ankur.addweb at AddWeb Solution Pvt. Ltd. commentedAttached patch adds permision in module file as suggested by oinuma.
Comment #7
krina.addweb CreditAttribution: krina.addweb at AddWeb Solution Pvt. Ltd. commentedComment #8
nimek CreditAttribution: nimek as a volunteer commentedPlease be aware that #6 patch dont solve entire issue because user without permisson will still see handler without rendered weight form field that will cause same error and make a lot of confusion.
Solution should be that handler should be also hidden when user dont have permission to use weight module.
Comment #9
badrange CreditAttribution: badrange commentedThis issue actually seems to be fixed in the git/dev version of the module, in revision e7051c1f8c108006a8c2294d5a990ddefb3b321e, which closed #2674418
Comment #10
badrange CreditAttribution: badrange at Digia commentedThis is fixed in the git/dev version of this module.