• Resolved conducivedata

    (@conducivedata)


    Problem:
    I am receiving the following error on a registration form:

    Notice: Undefined index: label in /home/shorevillas/public_html/wp-content/plugins/ultimate-member/includes/core/class-fields.php on line 2398

    Cause:
    This occurs when no label is set for the password field. In several other places near line 2398 in class-fields.php, there is a check to confirm that $data[‘label’] exists before attempting to use it, however that was missed when generating the confirm password field’s placeholder text on line 2398.

    Plugin version: 2.1.16

Viewing 6 replies - 1 through 6 (of 6 total)
  • Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @conducivedata

    Could you please provide a screenshot of your Register form builder? Would like to see the fields added.

    Regards,

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @conducivedata

    Could you also tell me what’s the version of the PHP?

    Regards,

    Thread Starter conducivedata

    (@conducivedata)

    I provided a workaround for the client, and they were happy with the fix and already disabled my admin access to the site, so I can’t get you a screenshot or the PHP version. But those things aren’t necessary anyway.

    There’s a registration form with a Password field that has an empty Label. Line 2398 of class-fields.php, which is in a section of code that is used for outputting password and confirm password fields, tries to access $data[‘label’] without first verifying that the label exists. This generates the error message because there is no label set for the password field.

    Now look at line 2378. You’re checking for a label before outputting said label–perfect! But you also need to check for the label before using it to output the placeholder for that confirm password input.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @conducivedata

    Thanks for letting us know. Fixes will be included in the next release.
    https://github.com/ultimatemember/ultimatemember/tree/development/2.1.17

    Regards,

    Thread Starter conducivedata

    (@conducivedata)

    Thank you, I appreciate it. Sorry if I came across as rude.

    I took a look at the updated code and have one suggestion that I should have mentioned previously:

    Check for the Password field’s Placeholder instead of its Label when outputting the placeholder for the Confirm Password field.

    That will result in a Confirm Password field that is consistent with the appearance of the Password field. If Password has a label, Confirm Password also gets a label. If Password has a placeholder, Confirm Password also gets a placeholder.

    Plugin Contributor Champ Camba

    (@champsupertramp)

    Hi @conducivedata

    Thanks for letting us know. I’ve made changes to the pre-release version:
    https://github.com/ultimatemember/ultimatemember/commits/development/2.1.17

    Regards,

Viewing 6 replies - 1 through 6 (of 6 total)
  • You must be logged in to reply to this topic.