The "File browser" tab link that normally displays in the user account page won't display. Did I miss something? I've used IMCE before and it was showing this link. This link should go to "../imce"

CommentFileSizeAuthor
#9 imce-account-roles-0.patch410 bytesashtonium

Comments

harcher’s picture

This never happened to anyone else??

quwat’s picture

quwat’s picture

You are lucky man, how did you do that. Everybody wanna get rid of it and you are sad over the loss. It sucks man.

harcher’s picture

some people need it and some don't :)

ufku’s picture

Category: bug » support
Priority: Critical » Normal

File browser tab can be turned on/off in profile settings at admin/settings/imce

harcher’s picture

Nope can't find it...

I've already set a imce profile and assigned the correct user role to it. Then when I go to the profile setting page at "admin/settings/imce/profile/edit/2", there isn't on/off setting there.

And no on/off setting here: admin/settings/imce

ufku’s picture

Version: 6.x-2.0-beta1 » 6.x-2.x-dev

please try beta3.

ashtonium’s picture

I'm testing out 2.x-beta3 and I'm getting some odd behavior here. I've gone in and checked the box for "Display file browser tab in user profile pages." on all my IMCE profiles, but it's only showing up on my "admin" profile. For the other profiles, the tab doesn't show up until I click on the "edit" tab--the "file browser" tab then shows up but disappears again when I click back to the "view" tab.

ashtonium’s picture

Category: support » bug
Status: Active » Needs review
StatusFileSize
new410 bytes

After a little more digging, it looks like $user->roles is being built differently on the user/[uid] page:

roles (Array, 3 elements)
0 (Integer) 2
1 (String, 1 characters ) 4
2 (String, 1 characters ) 9

While on the user/[uid]/edit page we have:

roles (Array, 3 elements)
2 (String, 18 characters ) authenticated user
4 (String, 14 characters ) content editor
9 (String, 13 characters ) content admin

$account->roles, however, is consistent on both pages, and looks to contain what imce_user_profile() is looking for. So if we pass $account instead of $user in imce_user_page_access() then it seems to work.

I've attached a patch for this small change, but let me know if there's a better solution (or a reason we shouldn't be passing $account here).

ufku’s picture

Status: Needs review » Fixed

This is already applied to 2.x
OTH, the bug here is not an IMCE bug. There must be another module causing incorrect roles array. You should identify it and open an issue against it.

Status: Fixed » Closed (fixed)

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