Closed (fixed)
Project:
Quickbar
Version:
7.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
12 Dec 2011 at 18:13 UTC
Updated:
11 May 2016 at 15:34 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
bocaj commentedI'm not seeing this issue. Do you perhaps have the authenticated user role listed higher than your other role(s) at admin/config/user-interface/quickbar? Since every user is in the authenticated user role then, if this is above the other role(s) in the table, all of the settings for authenticated user will be caught and not for the specific role you are trying to target.
Comment #2
dboulet commentedNo, the "administrator" role is first in the list. Assigned menu for the "administrator" role is "Management" and assigned menu for "authenticated user" is "none".
Comment #3
bocaj commentedYeah, the more I'm playing with things I'm starting to see this issue crop up. I can't exactly put my finger on it though. It seems like if I manually order the roles, then it works, but if the role weights have been altered then there's some issues. But, I'm also seeing some issues after I've adjusted the role weights. I'm not sure exactly what's going on here. I will look at it again when I have a span of time to allot into looking into it further. It's not jumping out at me with a quick look.
Of course, if you make any progress on it, please let me know! Thanks!
Comment #4
redndahead commentedAfter this one is figured out then I want to roll a beta2 release of 2.x and make the 1.x final. I'm tagging some issues as release blockers for the 2.x release.
Comment #5
redndahead commentedComment #6
ldweeks commentedWhen I found your module, I wanted to buy you a good, hard drink. Thanks *so* much for working on this. It's awesome, and I looked for a long time before finding it.
I'd be happy to test this issue some with a few more pointers.
Comment #7
bocaj commentedI have tested both 7.x-1.0 and 7.x-2.x and cannot get this issue to come up again. I have moved the roles at admin/config/user-interface/quickbar to many different positions and have set various different options for each role and I am getting the options I set for the role that is highest on the list that pertains to the logged in user.
Is anyone else still having this issue with the latest devs? Nothing in the recent commits would affect this issue that I know of, but (as stated in #3) I do remember this issue popping up when I was looking into it then. It's odd now that I cannot reproduce it. Both branches on my test site are updated to the latest dev releases.
Comment #8
dboulet commentedMaybe some screen shots will make things clearer. These were taken as user 1, using the latest code from git.
Choosing a menu for “administrator” works as expected.
Yet, the configuration options for “administrator” have no effect.
I have to instead change the configuration for “authenticated user”.
The assigned menu is taken from “administrator” but the configuration is taken from “authenticated user”.
Comment #9
bocaj commentedOK. After looking into this more from the screenshots @dboulet posted, I have rolled a patch that will hopefully take care of this issue. It seems like the issue revolves around the icons (which @dboulet's screenshots point out). Since I never use icons, and didn't think to test them, I wasn't seeing that issue.
Please apply this patch and let me know if this works (patch for 7.x-2.x). I have tested it with multiple different configurations again on a clean install of Quickbar and it appears to work.
Also, I didn't notice any issues with any of the other configuration settings. Although, since it appears like the icon issue was due to a role weight bug, those might be fixed as well if there were any.
You will notice some css changes in the patch as well. That is to fix some issues that cropped up when I changed around the weight handling. Just noting that this patch is for only this issue.
Comment #10
bocaj commentedComment #11
redndahead commentedThis is missing the second parameter of variable_get
Not so sure on this function, but if I don't get to a good review in time and it works I say go ahead.
Comment #12
dboulet commentedHaven’t had time to really study the code in the patch, but it does apply cleanly and seems to have solved the problem: configurations are now properly applied.
One issue that I did find was that after applying the patch and re-saving the order of the roles, the order was reversed and I had to re-adjust them.
Comment #13
bocaj commentedHi @redndahead!
In D7 variable_get() doesn't need a second parameter (NULL is default, which is fine for this check: http://api.drupal.org/api/drupal/includes--bootstrap.inc/function/variab...). To be consistent with the rest of the variable_get() calls in the module though, I will add a second parameter.
The reason for the _quickbar_default_weights() function is because if no weights are set (which is obviously the case when the module is first installed or if the admin never changes the order) then very weird things happen that affect the configuration settings (because the weights virtually aren't set). This function takes the role ids and multiplies them each by -2 so that the anonymous user role is weighted heaviest, followed by the authenticated user, then the administrator role, and so on. Of course, this is just a default setup and can be changed based on site needs. Setting all of the weights to 0 though was causing a lot of issues. I'm definitely open to another approach, that is just the one that I came up with when trying to debug the issue.
Maybe it would be better if the quickbar_role_weights variable was set when the module is enabled instead. That might make more sense then the way I currently have it setup.
Comment #14
bocaj commentedOops, our posts got crossed...
In reply to #12, I'm not sure why your roles got reversed after applying the patch. Did you set role weights before applying the patch or did you just leave them at their default settings?
Comment #15
bocaj commentedHere is an updated patch. This addresses @redndahead's mention of the variable_get() issue as well as resolves a notification that was popping up if the quickbar_role_weights variable was not set.
Comment #16
jefkin commented@bocaj not sure why your patch failed on me bocaj, but it happened on the css. I moved the new css link line up in the file as I think my patch and git's patch didn't like the notice about
\ No newline at end of fileSo, since I'd like to see some progress if possible, or at least a patch that works right for my upcoming deployment, I tried both methods of applying the patch, but only the by-hand-worked.
However, I built the changes by hand and tested it -- here's a reroll of your patch, that might work better?
Comment #18
redndahead commentedThis was committed.