It seems that Profile2 7.x-1.2+ uses the following URL patterns for profile edit pages:
user/1/edit/alternate
This is as opposed to the pattern that PCP currently expects:
profile-alternate/1/edit
| Comment | File | Size | Author |
|---|---|---|---|
| #7 | pcp-version-1414468.patch | 513 bytes | joelpittet |
Comments
Comment #0.0
grasmash commentedmore specific version numbers added
Comment #1
grasmash commentedVersion check has been added to dev version.
Comment #3
liban commentedThe links to my Profile2 fields have the following pattern.
"field-collection/field-XXXXXXXXX/4/edit&destination=profile-XXXXXXXXX/3"
And I'm unable to get PCP to work; the PCP block links just send me to a blank page. Any help please.
Thank you.
Comment #4
grasmash commentedliban, what version of profile2 are you using?
Comment #5
liban commentedHey Madmatter23,
I'm using Profile2 7.x-1.2. And the recruiter installation (I don't know if that changes anything).
thanks for any help.
Comment #6
BarisW commentedNo response in a month. Confirmed that it works with the latest version of Profile2. If this is still an issue, please re-open.
Comment #7
joelpittetHere is a patch that allows the profile2 to catch the dev version checker as well.
version 7.x-1.2+5-dev
grabbing the 1.2 out of the middle.
Comment #8
joelpittetComment #9
joelpittetOn a second look, where are you getting this new path structure from?
I have looked at 1.2 and 1.2-dev and both have the old structure.
http://drupalcode.org/project/profile2.git/blob/e176532f8b10568e42485237...
http://drupalcode.org/project/profile2.git/blob/e176532f8b10568e42485237...
Comment #10
nbchip commentedIm using profile2 1.2
PCP sends me to:
http://localhost/www/user/17/edit/athlete#edit-profile-athlete-field-per...
Correct Path , using profile2 1.2 should be:
http://localhost/www/profile-athlete/17/edit#edit-profile-athlete-field-...
So it seems that profile2 1.2 still uses old path. After overriding version check in pcp.module everything works.
Comment #11
BarisW commentedEhm, I just tried with Profile2 1.2 and I'm certain it works. Can you please double-check the version you are using?
Comment #12
chrbak commentedThe problem relies on a certain setting that there is in every edit page of a profile type (profile2 version 1.2). If the 'Provide a separate page for editing profiles.' setting is checked then the link of the next empty field to complete is wrong, sending the user to a none existing page.
I think the line 438 (pcp.module file) needs to be changed to something like the code bellow :
If the $profile_type->data['use_page'] is set to 0 (not checked) the profile2 uses the new path, in the opposite case the profile2 uses the old path.
Comment #13
scottsawyerThis is exactly what I need. My question is:
I am currently using 7.x-1.3 release April 28, 2012.
I see the Dev version was updated July 30, 2012. I looked in pcp.module, and it appears this recommendation has been applied, is that correct?
Follow up question: I want to stick with 7.x-1.3 until a new release comes out. If I manually apply this "patch", are there any other dependencies I need to be aware of? Meaning, if I change this function, are there any other changes I need to make?
Thanks for the great work on this module, if I get it working as my customer expects, I will be in great shape.
Comment #14
scottsawyerOk, I checked out the code for 7.x-1.x-dev July 30, 2012 and it does not contain the suggestion in #12. I compared the function in this dev to the 7.x-1.3 April 28, 2012 and the they appeared identical.
So, I made the suggested edit and things seem to be working perfectly.
To recap:
With Profile2 setting Provide separate page for editing profiles selected, the PCP link pointing to a suggested field to increase completion percentage points to the wrong location. (basically, it was always pointing to user/*/edit*, I need it to point to profile-[type]/edit)
Applying the suggestion, when I have a separate Profile2 edit page, the link produced by PCP points to the correct profile location.
Have not yet tested when I have multiple profile2 types. I will check and report back.
Thanks for everyone's input on this.
Comment #15
chrbak commentedI am using code #12 with 9 profile types and i don't have any problem until now..
Comment #16
grasmash commentedThanks for all of the input.
I've found a simpler solution to this:
Committed!
Comment #17.0
(not verified) commentedfixed url example