I am using Web Links 6.x-2.3 on Drupal 6.14. I have created groups with links in two levels - the top level contains subgroups that contains the links.
When I am logged in (with "administer weblinks" access) I can click on one of the subgroups (which initially displays collapsed), and it will alternate between expanded and collapsed, with no other change - this is as I want it.
If I log out (no "administer weblinks" access) the behaviour changes. The subgroups will be displayed expanded already when I click the top level group, and if I click the name of the sublevel group it will not only collapse - I will also move to a node containing _only_ this subgroup - I will no longer see the groups on the same level or the parent group.
Was this possible to follow?
I can "solve" the problem by giving anonymous users "administer weblinks" access, but that is clearly not something I want to do.
| Comment | File | Size | Author |
|---|---|---|---|
| #14 | 657760_14.max_depth_and_collapsible_for_anon_users.patch | 1.96 KB | jonathan1055 |
| #12 | d7_weblinks_links_page_settings.jpg | 202.63 KB | GStegemann |
Comments
Comment #1
alrueden commentedDo you have "Make groups collapsible" and "Collapse all groups" set to yes in Settings > Links page? That's how I have mine, and it works for both anon and admin users. I'm not really sure why there would be a difference between anon and admin users for that setting, but it's a place to start.
Comment #2
rmiddle commentedI am pretty certain there is a permission dealing with Collapse blocks itself. Are you sure the only change you are making is removing the Admin Bit?
Thanks
Robert
Comment #3
alrueden commentedIf there is a collapse permission, I don't see it. Here's how my permissions for Weblinks are set:
Anonymous:
access web links - yes
administer weblinks - no
create weblinks - no
edit group weblinks - no
edit own weblinks - no
view click count - yes
view my weblinks - no
You can take a look at the result here: http://144.92.48.144/weblinks
Are you using the same browser for both tests? The collapsing fields only work if Javascript is enabled.
ETA: I'm using the latest dev version of Weblinks, by the way. I've found those are usually the most reliable!
Comment #4
rmiddle commentedWe have seen that problem before it is a problem outside weblink setting I just can't remember where it was listed.
Thanks
Robert
Comment #5
drupalusering commentedfor me /weblinks/xxx or weblinks/225 for example displays access denied. The permission for anonymous user is set to access the weblinks. The main links path /weblinks works but if the group number is added it does not
Comment #6
drupalusering commentedfixed by creating a view and adding Node ID from URL arg (for my previous comment)
Comment #7
alrueden commentedI linked to the different groups by name rather than number, like category/web-links/name-of-group. That seems to be working fine for me, no Views required.
Edit: Whoops, wrong. Actually my menu sidebar was made with weblinks/### links using the Primary Links menu. It does work perfectly without Views, though. Not sure what I'm doing right here!
Comment #8
Lekhite commentedI had the same issue and no matter what I tried I could only collapse / expend the links while logged in as admin.
To fix it I increased the "Maximum group depth (main links page):" in "Settings - Link page settings" to the depth of my groups from the root level.
Basically the default was 1 and I changed it to 10.
Comment #9
ragesoft commented@Lekhite
this fixed it for me too! (Post #8)
Now the users without admin can also collapse the subgroups.
Comment #10
Kristjan Logason commented@Lekhite
Thanx for this you saved the leftovers of my hair :)
Comment #11
shaneonabike commentedI am having the same problem and it seems weird that we need to do such a strange configuration change to make it work?
Modifying it to a deeper level actually makes this work for me. (nice work @Lekhite)
Can I suggest that something gets changed for Administrators so that it doesn't automatically collapse it (as in it acts just like it would for normal users).
Comment #12
GStegemann commentedSuch a change was implemented in the D7 version of Web Links, see screen shot.
Comment #13
GStegemann commentedComment #14
jonathan1055 commentedThanks for the prompt. I've investigated this further and it is a bug in D6 - the problem was in the conflicting setings of collapsible and collapsed not working correctly together when at the max depth (which is 1 for anon users). Specifically this was happening because the check for
$term->depth > $max_depthon line 820 was in conflict with$new_tree[$tid]->depth < $max_depthon line 853It was actually reported as part of #2202721: Collapse all groups by default. Improved 'max depth' setting which was raised at 6.x initially, but only fixed at 7.x. The same type of fix can be made, which I have tested and have attached a patch. The other things related to this and fixed here are (a) check that the term has a name before attempting to turn it into a link. This only affects the 'unclassified' group, which can have a blank name. (b) allow the fieldset to be collapsible regardless of the depth.
Comment #15
GStegemann commentedThanks for investigationg this issue and the fix.
Tested and works.
Comment #17
jonathan1055 commentedThank you. It is nice to be slowly working through these old issues and reducing the open count. 72 - 2 fixed = 70 left.
Comment #18
GStegemann commentedYou're welcome.
Yes, that's good.