Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
If I go to 'user/me/edit/profile' , edit my profile, and save it, I get redirect to /profile/profilename instead of redirect back to user/me/edit/profile.
That is because in content_profile_form_alter() there is is_numeric(arg(2)) check that is not working with 'me' alias. I've fixed the problem removing this check from condition.
Comments
Comment #1
rburgundy CreditAttribution: rburgundy commentedsubscribing - can you please share exactly the line/code you altered for the community?
also, will this change affect any other uses of this module?
Comment #2
marcus_gbs CreditAttribution: marcus_gbs commentedI am having issues as my pageroute is aborting after the content_profile creation, so I was wondering if this could possibly be the issue I am seeing as well.
I searched the entire module and found only one call to is_numeric. It is on line 273 of the content_profile.module file. This is within the content_profile_form_alter function. The lines, starting with 272 are:
I have not investigated this any further than this, but thought I would post so that you would know what I found and maybe both of us looking at this might find something or maybe the module owner will take a look.
Comment #3
fagoThere is no such alias in core?
Comment #4
fagoAnd no patch.
Comment #5
restyler CreditAttribution: restyler commentedI think instead of removing is_numeric check you should add 'me' to the condition:
Change
to
(not tested but I hope it's ok)
Comment #6
einpol CreditAttribution: einpol commentedworking for me. patch would be good.