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.
I have a registration path setup which auto assigns a user role.
It works fine in the beta3 version but when I add an alias for this url ( admin/config/search/path ) the registering user doesn't get the role assigned.
Comment | File | Size | Author |
---|---|---|---|
#3 | profile2_regpath-alias-fix-1951954-3.patch | 2.87 KB | scuba_fly |
Comments
Comment #1
scuba_flyIf I'm correct this could be fixed by changing
line 463 - 467 of profile2_regpath.module :
To also let it check the url aliases table and search for
'/register'
As I think it now does not check the url alias pad because it doesn't contain 'register'
edit: no that's not working, because the $path that is checked ( the alias ) is non existing in the regpath module.
So we need to get the alias path(s) and if one of them is used and then check the 'original' path.
Or: don't check the $url['path'] but the internal path if that's possible.
Comment #2
scuba_flyThink this will fix it. I'll create a patch in my next post.
Comment #3
scuba_flyCreated a patch against the dev version but I think the beta3 version is the same at the moment so it should work for that as well.
Comment #4
grasmash CreditAttribution: grasmash commentedThanks for point this out.
There's no need to create profile2_regpath_check_alias(). We can use drupal_lookup_path().
Pushed commit up to dev.