hi

i was trying to add a new new profile, leaving the URL path empty. even if i didnt tick the "Enable unique registration path", it checks the empty URL path, saying its already in use.

should it work like this? to me its only supposed to validate the URL path field, only if the enable checkbox is ticked.

or am i getting this wrong?

CommentFileSizeAuthor
#4 Untitled.png51 KBhalmsx
Untitled.png161.26 KBhalmsx

Comments

halmsx’s picture

Priority: Major » Normal

changing the priority to normal.

halmsx’s picture

located the problem. well, i thinks it is.

seems this module saves a record whenever a profile type is saved.

to me, validations and saving should be done only if the "Enable unique registration path" checkbox is ticked.

then, if the user un-ticked the checkbox, delete the path record if it exists.

to recreate this problem,
1. try creating a new profile type by only typing in the label. leave the other fields as default.
2. edit the "Main profile", but just click the save button, do not change anything in the form.

you can also try by doing no 2 first, then no 1. or, repeat no 2 a few times, if possible. it gives same result.

comments?

grasmash’s picture

Version: 7.x-1.0-alpha1 » 7.x-1.x-dev
Status: Active » Closed (fixed)

Thanks halmx,

I've fixed this issue in the dev version-- it only runs validation when the 'enable' box is ticked.

halmsx’s picture

StatusFileSize
new51 KB

hi,

i removed, then uninstalled the alpha, deleted the directory. installed dev, and still same problem.

installed a fresh d7, installed required modules and the dev version. still same problem.

still cant create more than 2 new types without entering the paths.

halmsx’s picture

Status: Closed (fixed) » Needs review

hi

i add the statement to check for the checkbox status in profile2_regpath_save_settings and its working.

function profile2_regpath_save_settings($form, &$form_state) {
    if ($form_state['values']['status'] == 1) {
        ...
    }
}
grasmash’s picture

halmx,

this is actually the code that's used in the dev version, but the new nightly snapshot hasn't been taken yet. So, the dev you downloaded isn't the most recent.

To be sure that you're getting the most recent, you'd need to download the git repository and then use the git_deploy module if you'd like drupal & drush to handle the updates.

grasmash’s picture

Status: Needs review » Closed (fixed)

closing, already fixed,

halmsx’s picture

thanks, having problem with the git on my mac. will wait for later release.