• Resolved justano

    (@justano)


    Hello!
    I keep getting “Unexpected token < in JSON at position 0” while trying to sign up (with a test account).
    It worked fine until I changed sign up option to “email confirmation to login”,

Viewing 5 replies - 1 through 5 (of 5 total)
  • Plugin Support sanjuacharya77

    (@sanjuacharya77)

    Hi @justano,

    Could you please provide me the URL of the registration and login form? The issue might usually caused by either a conflict with your theme or with another plugin.

    So please temporarily switch your theme to any other and disable all plugins except User Registration. If everything works fine then you can activate other plugins one after another and do test registrations at the same time. This will let you know the cause behind the error.

    Let me know if the error still exists after deactivating all other plugins and I will get back to you.

    Regards!

    Hello Support Team,

    we have a similar problem and get the same error message. For us it only pops up when we try to register a new user via a UR form and the user trying to register uses a login name that already exists. When they use an email address that already exists, a standard message like “email already exists” appears after submitting the form.
    But an already existing user name results in a red “Unexpected token < in JSON at position 0” error message.

    I copied our WordPress installation to a test subdomain and deactivated all unneeded plugins, but that didn’t help much in finding the error because then the submit button was dead…

    Then I tried to create a workaround in the functions.php by “translating” the error text to a human readable message like “your user name already exists”. But that didn’t work either :-/

    I also found out, that I already translated the UR error messages to our native language by using loco translate. And the translation is still active, but nonetheless, the error messages comes out as Unexpected token < in JSON at position 0.

    This happens in UR Version 1.8.3 and 1.8.4- But I’m pretty sure it used to work before.

    Any ideas? I’d be glad about any kind of response.

    Hello again,

    I have gathered more information about the error:

    The messages differ:
    Chrome: Unexpected token < in JSON at position 0
    Firefox: JSON.parse: unexpected character at line 1 column 1 of the JSON data
    Edge: JSON.parse Error: Invalid character at position:1

    The error might have something to do with the plugin “Login Logout Register Menu”, that we also use. I deactivated all plugins except a few needed ones and the submit button on the UR register form stopped working. Then I activated the plugins again, one by one and checked the submit button. When the plugin “Login Logout Register Menu” became active again, the button worked like normal, and the error message appeared again, like before. Unfortunately this plugin seems to be abandoned. Deleting it doesn’t help either…

    If you like, you can test it yourself: go to https://test.uni-electronic.de/kundenbereich-registrierung
    To reproduce the error, use Test-04 in the input labeled with “Ihre Kundennummer”, which would be the user’s WordPress login name. The other inputs (company, mail, password) can be anything you like.

    Another idea was to rollback the UR version, but I went back to v1.8.1 and the error also exists there.

    Hope this helps!
    Kind regards
    Sarah

    Hi @sspengler,

    Thank you for taking the time to dig into the issue. As it happens to be, we have been reported this issue few times but we are still working on the reason behind it. To date, we have come to know that if a website has any PHP error, whether it is occurring due to our plugin or different plugin or maybe the theme then the Unexpected token error message is thrown during the registration process.
    So, the best thing that I would suggest you do is, deactivate all the plugins, switch your theme to default and see check what is causing the issue. You may also do a test by doing a fresh installation.
    On our side, we are working on it. We will try our best to fix it asap and let everyone know when the issue is resolved.

    Regards!

    We have same problem, how to fix it,
    when someone try to make registration show message:”

    • Unexpected token < in JSON at position 0

    We disable all plugins, but error still appear.

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘Unexpected token < in JSON at position 0’ is closed to new replies.