Hi,
I have created 2 profile2 profiles; one for individual profile and one for business profile. When a user tried to view another user's profile2 profiles on that user's account page, they obtain "Access Denied" error and all fields under individual profile and business profile are empty. If the user that owns the profile 2 profile views their own account page, they do not experience this issue. I have checked permissions for viewing and all are on.
Any ideas on why fields are empty when other users are viewing the profile2 profile info? and why access denied error is appearing?
Screenshots are attached below for owner and non owner view.
Any help is greatly appreciated.
Thanks
Comments
Comment #1
oystercrackher commentedCan't seem to resolve this. Any ideas?
Comment #2
oystercrackher commentedCan someone please take a look at this and advise?
Thanks
Comment #3
Uzo commentedHaving exactly the same issue. Authenticated users can't view other user's profile page even when they have permission to do so. profile2 supposed functionality is an integral part of my site hence i can't go live without a fix on this bug. Is their a timeline on when this issue will be resolved? Any helpful response will be greatly appreciated.
Comment #4
jorisx commentedSame here, even the admin can't view any profile2 info or pages.
Edit..
Disabling module 'Profile2 pages' will show all the info on one page for users with the correct permissions to view :-)
Comment #5
Uzo commented@jorisx,
I can view others' profile as admin but not the other way round. authenticated users (non-admin) can't view each others' profile pages even with the right permissions. Disabling the profile2 page module doesn't solve the problem for me.
Comment #6
SMTF commentedI'm having the same issue. Only Admin user can edit profiles. The user who's profile it is gets an access denied message. A speedy fix for this would be very welcome. I'm happy to provide more details or testing.
Following ...
EDIT: I'm not convinced this is a problem on the current stable release. It looks like I was able to resolve my problem by experimenting with the Profile permission system.
It would prob. be helpful if someone could provide/confirm steps to reproduce the problem.
Comment #7
drupalycious commentedSame problem,
In the permissions I have checked the option "see any profiles type" for "authenticated users" under the Profile2 permissions and I also checked "view users' profiles" under the "User" permissions but an authenticated user cannot see another user profile information.
Could you have a look to this issue?
Thank you
Comment #8
drupalycious commentedissue fixed I think,
not only you have to check "view any profile" for the profile type and for the user role you want to grant the permission under the "profile2" permissions options,
But you have also to check "View user profiles" under the "User" permissions options
so that the users belonging to a certain role (for example, "authenticated users") will be able to view the others users profiles.
My problem was that I was working on a test site and the user I was trying to view the profile was blocked, I had to activate his account so that non admin users could see his profile.
Does it work for you too, now?
Comment #9
Uzo commented@sp-drupy,
All permissions are set correctly but still not working for me.
Tested on: Drupal 7.14
User Permisions
View user profiles -> authenticated user: True.
Profile2 Permisions
Main profile -> View own profile -> authenticated user: True
Main profile -> View any profile -> authenticated user: True
Yet authenticated users cannot view other user's profile.
Comment #10
pwaterz commentedI think something else is going on here. I am using profile2 and not having this issue. Do you have any other modules that are adding functionality to user or to profile2?
Comment #11
areynolds commentedI'm currently experiencing this same issue (7.x-1.2+7-dev Profile2). I am using Panels to override the user account page, but it seems that this is unrelated (I experience the problem no matter whether I'm using Panels to override the page or not). Guess I'm joining the bug hunt!
Comment #12
areynolds commentedInteresting, this issue was supposed to be fixed in dev according to this issue. However, I just made sure that I'm on the latest dev release, and I'm still experiencing the issue.
In the same issue someone mentioned Profile2 Privacy 7.x-1.2 as being the root of their problem. I don't have this module installed, so it's not applicable in my case.
I did some basic debugging by printing out some variables in the profile2_access() function. It appears that users of the authenticated role (who should have all the correct permissions allotted) don't even enter this function. My admin users do. Since I believe this is the access callback defined in profile2_page.module for viewing profiles, I would assume that this means something is going wrong earlier in the process for authenticated users.
Still hoping this is just something stupid that I'm missing :)
Comment #13
areynolds commentedJust tried uninstalling Profile2 and re-enabling; no go. Thinking about trying some legacy versions and seeing if that helps.
Comment #14
areynolds commentedOk, it was something stupid in my case. Turns out the site I was working on was blocking new user accounts by default, thus the Access Denied. Disregard my previous comments.
On a side note, I'd be interested to hear if the other queue posters are still experiencing this issue with the -dev version?
Comment #15
Uzo commentedOn a fresh drupal 7.14 installation with only Entity API contrib module, profile2 works fine with all the permissions set correctly. Some other module might be interfering with its proper functioning. still working to figure it out.
Comment #16
oystercrackher commentedI was the one who originally posted the issue and I believe the issue may have something to do with the naming of the profile as well as the fields set for the profile. If you look at the original screenshots attached above, you will see that the owner of the profile as well as admin does not receive "Access is Denied" AND can also see all fields for that user's profile. Other authenticated users cannot view the fields of that user's profile and get "Access Denied" error. I have all permissions set properly as well. Attached are additional screenshots showing similar results.
Any input or thoughts are appreciated.
Thanks
Comment #17
screeno commentedsubscribe
Comment #18
Uzo commented@oystercrackher
Do you have Organic Group module installed? If yes, which version?
Comment #19
oystercrackher commentedAll,
I have resolved the issue as was posted here in #13 http://drupal.org/node/1510642
@Uzo
Yes I do. Organic Groups Version 7.x-1.3.
Thanks
Comment #20
oystercrackher commentedClosing as was fixed as was referenced in #19.
Thanks
Comment #21
Uzo commentedOoh goodness! #19 fixed it.
Thanks oystercrackher.
Comment #22
nancydruI am seeing this issue and do not have Profile2 Privacy installed (as someone else stated).
Comment #23
nurulshakina commentedsolution #8 works for me, thanks sp-drupy
Comment #24
nancydruNot for me. Both permissions are given to Authenticated users, but we still see this error.
Comment #25
kundu commentedI don't know if it helps anyone, but in my profile_type field (on the database) i'm always getting this
a:2:{s:12:"registration";i:1;s:8:"use_page";i:0;}When before I had this:
a:3:{s:12:"registration";i:0;s:8:"use_page";i:1;s:9:"page_path";s:6:"resume";}When i change it, it works again, but I would like to know why it changes by itself. I guess "Features" has something to do it, but not sure.
p.s: resume is the profile path.
Comment #26
davidpugh commentedHello, I am having the same issue with "Access Denied" when viewing user profiles (except the user whose profile it is and user 1).
If I disable Profile2 Privacy the "Access Denied" errors go away.
I created a forum posting on this here:
http://drupal.stackexchange.com/questions/118613/profile2-access-denied-for-users-profiles-with-access-denied-backtrace-log
I am also using "Access Denied Backtrace" module, and have a full backtrace report on it here:
http://mangroves.elaw.org/backtrace.txt
One thing I don't see here are any reports showing what might be causing the access denied. I have the report, but
am having a hard time deciphering it.
Check out the backtrace.txt report and the drupal stackoverflow page. You won't find more detailed information about this problem anywhere (at least, I couldn't find more detailed info anywhere).
Comment #27
s_chandela commentedHello everyone,
I am facing same issue that Registered user couldn't view the another users information. It is shows access denied page.
I m having hard time and spend more than 3 days on it.
Also is there any changes i have to make in order to achieve like one registered user can access the registration page and add/manage its details.