Active
Project:
Content Profile
Version:
6.x-1.0-beta4
Component:
Base module
Priority:
Minor
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
6 Aug 2009 at 20:34 UTC
Updated:
20 Oct 2009 at 14:47 UTC
I have a profile type content profile, ie content type 'profile'
node/add/profile
0 / 1 / 2
$form['#redirect'] = arg(2) == 'profile' ? 'user/'. $form['#node']->uid : $_GET['q'];
It'll redirect despite being on the node/add/profile page! and since I'm using the slightly altered for multi verison ie $form['#node']->uid = 0 , it's really incorrect behavior
$form['#redirect'] = arg(0) != 'node' ? 'user/'. $form['#node']->uid : $_GET['q'];
Comments
Comment #1
fagoBut only if the user is editing it from the user profile integration -> "if (arg(0) == 'user' && is_numeric(arg(1)) && arg(2) == 'edit' || arg(2) == 'profile') {"
So it should be fine.
Comment #2
hefox commentedNot sure if this is still an issue, but based on above I think it's still an issue. Sorry for reopening,; I believe it was redirecting still (it's been a while) do to the OR; missing parentises ()
arg0 is user AND is numeric arg 1 AND arg2 is edit OR arg(2) is profile, ie it succedes whenever arg 2 is profile even if arg0 isn't user etc.
that's probably the real issue XD!
Comment #3
itsnotme commentedOkay, I don't quite get your code discussion, but does it possibly refer to the bug I see here?
* User A has a content profile with UserProfile (created) and UserProfileExtended (not created yet). The whole user/content profile is displayed on one page.
* User B looks at the profile of User A and sees a tab "UserProfileExtended" - when he clicks on it, he's redirected to his OWN Edit UserProfileExtended page (which is better than if he could edit that of User A, but still not the expected behavior).
The tab is not visible if User A has already created his UserProfileExtended.
A fix would be very welcome :)
Comment #4
hefox commentedNo, this is not realted but I suspect different. Please search the forum related to the content_profile_page_access or content_profile_page_edit function; that would be my guess.
I suggest opening up a new issue