There is a problem with the separate registration page setting, when running a site in a folder different than the web server's root folder: The path is falsely parsed, and the profile fields do not get attached.
As an example, consider a site running at localhost/contract_a/site_1 (contract_a/site_1 subfolder of localhost's root folder)
On function profile2_regpath_form_alter of profile2_regpath.module, @ line 169 else-block:
$url['path']
gives /contract_a/site_1/profile_name/register
and then with the following lines:
$path_parts = explode('/', $path);
$path_key = reset($path_parts);
so path_key is not equal to profile_name, as it should be, but equals first subfolder of www base folder, where the site is installed, which in my case is "contract_a". As a result, the $path_key is not valid, so the fields do not get attached on the form.
Enabling $base_url variable into settings.php does not help.
I propose a solution, please see the attached patch.
Comment | File | Size | Author |
---|---|---|---|
#8 | problem_when_site_is-2541374-8.patch | 1 KB | kostask |
#7 | false_path_parsing-2541374-7.patch | 1.13 KB | attisan |
#4 | false_path_parsing-2541374b.patch | 1.06 KB | efpapado |
#1 | false_path_parsing-2541374.patch | 626 bytes | efpapado |
Comments
Comment #1
efpapado CreditAttribution: efpapado commentedComment #2
efpapado CreditAttribution: efpapado commentedComment #4
efpapado CreditAttribution: efpapado commentedAnother try with a better logic, and a better PHP syntax.
Comment #5
efpapado CreditAttribution: efpapado commentedComment #6
efpapado CreditAttribution: efpapado commentedComment #7
attisan#4 did not work for me so I wrote my own based on #2338947: Roles not assigned AND Profile fields not visible in register page and #2270955: Admin profile add user path is the same as the default
hope it helps.
Comment #8
kostask CreditAttribution: kostask at Point Blank commentedHere is a patch that tries to address the problems mentioned by efpapado and attisan