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.

Comments

alrueden’s picture

Do 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.

rmiddle’s picture

I 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

alrueden’s picture

If 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!

rmiddle’s picture

We have seen that problem before it is a problem outside weblink setting I just can't remember where it was listed.

Thanks
Robert

drupalusering’s picture

for 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

drupalusering’s picture

fixed by creating a view and adding Node ID from URL arg (for my previous comment)

alrueden’s picture

I 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!

Lekhite’s picture

I 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.

ragesoft’s picture

@Lekhite

this fixed it for me too! (Post #8)

Now the users without admin can also collapse the subgroups.

Kristjan Logason’s picture

@Lekhite
Thanx for this you saved the leftovers of my hair :)

shaneonabike’s picture

I 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).

GStegemann’s picture

Issue summary: View changes
StatusFileSize
new202.63 KB

Can I suggest that something gets changed for Administrators so that it doesn't automatically collapse it

Such a change was implemented in the D7 version of Web Links, see screen shot.

GStegemann’s picture

Issue summary: View changes
jonathan1055’s picture

Version: 6.x-2.3 » 6.x-2.x-dev
Status: Active » Needs review
Related issues: +#2202721: Collapse all groups by default. Improved 'max depth' setting
StatusFileSize
new1.96 KB

Thanks 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_depth on line 820 was in conflict with $new_tree[$tid]->depth < $max_depth on line 853

It 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.

GStegemann’s picture

Status: Needs review » Reviewed & tested by the community

Thanks for investigationg this issue and the fix.

Tested and works.

  • jonathan1055 committed 7302b88 on 6.x-2.x
    Issue #657760 by jonathan1055: Only users with "administer weblinks"...
jonathan1055’s picture

Status: Reviewed & tested by the community » Fixed

Thank you. It is nice to be slowly working through these old issues and reducing the open count. 72 - 2 fixed = 70 left.

GStegemann’s picture

You're welcome.

Yes, that's good.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.