• Resolved efed

    (@efed)


    Straightforward and troubling – upon attempted sign-up, no matter what’s put in the fields, it turns up the same error:
    ERROR: Please enter your Display name publicly as.
    It’s only started happening in the last few days, with especial consistency these couple of days. We didn’t have an event for sign-up before this week, so I can’t pinpoint exactly when this became an issue.

    I can’t find any documentation online with a similar issue and I can’t find the particular file this error message comes from, with my amateur guesses as to the more likely files.

    The website is a hosted installation, automatically updated to WP 5.2. I’ve flushed the cache both of the site and the host’s cache.

    There are two plug-ins that seem to use the same user database and merely re-skin the log-in page – Theme My Login and Directory Pro.

    – I did change a label in Theme My Login’s forms file to add that usernames cannot use spaces (as early attempts tried this), and replaced the forms file with the old version when the error persisted. I disabled Theme My Login to check, and the error is the same, so I’ve re-enabled it.
    – Directory Pro is being actively used with data, so I’m not confident disabling it on the live website.

    At the moment, log-ins are working, as are password retrievals.
    I, as an admin, can create accounts and have them log-in successfully. It’s just new registrations that are the problem.
    The site is live and we currently do have an event that needs log-ins, so I’m not confident replacing the wp-login.php in the case it affects the current ability to log-in as well as new registrations.

    If anyone could help or give me an idea of what else to troubleshoot, I’d be very grateful. Thank you for reading.

    The page I need help with: [log in to see the link]

Viewing 5 replies - 1 through 5 (of 5 total)
  • Moderator bcworkz

    (@bcworkz)

    There is no error message worded like that in WP core, nor Theme My Login. It’s possible for such messages to be composed from partial phrases, or they can have HTML code mixed in, so searching can be difficult. I searched just for “Please enter your” and found nothing in Theme My Login. I used the Unix grep command to search all plugin files for that phrase. If it were there, it would be found. There are several phrases in core that start with “Please enter your”, but nothing connected with “Display name publicly as”, which is a label on the profile screen. The two would never appear together in core code, especially on new registrations.

    This makes Directory Pro highly suspect. Checking it by disabling only takes a couple minutes. I understand your reluctance to do this, but it’s important to confirm or refute the plugin causing the problem. Maybe do it during a slow time for your visitors. Weekends are usually good for this. You could even setup a .htaccess rewrite rule that redirects all traffic, except any from your IP address, to a HTML page stating “We’re experiencing unusually heavy traffic at the moment and cannot fulfill your request. Please try again in a few minutes.” A complete lie of course, but it sounds plausible and does no harm.

    Be sure you’ve flushed all caches before testing.

    Thread Starter efed

    (@efed)

    @bcworkz Thank you for the clear breakdown – you articulated my concerns perfectly, especially in relation to this very particular error code. It was very kind of you and incredibly helpful that you helped me search the code, at least it takes out some variables.

    With your recommendation I mustered up the courage to take down Directory Pro for a check in the dead of the night here. Unfortunately the error still persists, but it’s good to strike one more possibility off the list.

    Thank you very much for your help.

    If there might be further insight or troubleshooting recommendations, I’d still be very grateful!

    Moderator bcworkz

    (@bcworkz)

    Check your error log for clues. Even non-fatal warnings can point to serious coding errors. If that doesn’t help, you are likely left with tracing through code execution until the problem is identified. This can be very tedious and time consuming, but it’s very reliable when done properly.

    While everyone is always admonished to never alter core code, temporary changes for debugging purposes is totally acceptable as long as the original is restored. While it’s unlikely you’ll find any errors in core, analyzing what happens in core as it relates to theme and plugin code is often necessary when tracing code.

    Does the registration form still submit to wp-login.php? Or is a different handler used? In either case, be sure the form values actually make it to the destination file. Some redirects can drop form values submitted through GET method. In wp-login.php, we’re looking at line 799 $user_login = $_POST['user_login'];. The values are POSTed, so we should be OK so far. Good to check anyway.

    When tracing code, the browser is not always expecting output, so echoing debug data can be unreliable. I like to send data to the error log with something like error_log("user_login form value: $user_login");. Multi-line output like from print_r() is hard to read in the error log, I prefer to send such output to my own log file. I’ve a colleague that likes to email himself debug output ??

    The next step when submitting to wp-login.php is register_new_user(). It uses WP_Error class to register issues encountered, so you could capture returned data from $error->get_error_messages() and output to log file or email. Your error message likely comes from these checks, or similar checks if not using register_new_user().

    Once you know which check threw the error, work back from there to figure out why the check failed. Check every variable involved along the way. I suspect there is an assignment disconnect somewhere nearby. If it comes from another function call, you’ll need to then drill into that function’s code to determine why it failed to return an acceptable value. By continuing in this manner you will zero in on the root cause of the error.

    Thread Starter efed

    (@efed)

    @bcworkz Thanks a ton for your details and examples, I’m definitely keeping this in mind for future reference and troubleshooting given how important registration can be.

    With some help and finally biting the bullet, we found it to be – unexcitingly – a plug-in issue.
    Surprisingly, it was Woocommerce, both an older version and the most recent update, hiding the WordPress sign-up field: ‘Display name publicly as.’ Since it was hidden, and therefore left empty on registration, the error was stated as such.
    Thankfully we’re not using it at the moment, so it was easy for our website to disable it, but since it’s so commonly used, I thought I should mention it here in case anyone else has a similar issue in the future.

    Thank you for all your kind help and generosity!

    Moderator bcworkz

    (@bcworkz)

    You’re welcome! I’m just glad you were able to track down the issue.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘New User Registration ERROR: Please enter your Display name publicly as.’ is closed to new replies.