• Resolved mystyleplatform

    (@mystyleplatform)


    There is a stray curly bracket in the Loginpress Javascript code on the login page. It’s throwing a JS syntax error in the console.

    Uncaught SyntaxError: Unexpected token ‘}’ On line 752

    Code:

    image.setAttribute( "style", "display: block;margin: 0 auto;position: absolute;top: 50%;left: 50%;transform: translate(-50%, -50%);" );
     subButton[0].appendChild(image);
     }  }; </script>

    There is also left-over commented out code in that same code block a few lines above. That’s generally bad practice and should probably be removed to avoid confusion with the }’s or breakage with minification

    • This topic was modified 3 years, 1 month ago by mystyleplatform. Reason: added line number

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Plugin Contributor Abdul Wahab

    (@abdulwahab610)

    Hey, @mystyleplatform

    Thank you for reporting the issue. The query has been forwarded to the development team. They’ll look at the issue and will get back to you.

    Looking forward.

    Thread Starter mystyleplatform

    (@mystyleplatform)

    Thanks Abdul, please let me know what they find.

    Plugin Contributor Abdul Wahab

    (@abdulwahab610)

    Hey, @mystyleplatform

    The above code you show has no issue and this is not the normal behavior that you explained.
    We’ve looked into your site and figured out that you’ve minified the files using another plugin. In response, you’re facing this error.
    Can you please share your log file with us at LoginPress.Pro? It’ll help us in finding the issue. Log file can be found from dashboard menu LoginPress > Help.

    Looking forward.

    Hi @mystyleplatform,

    Please know we are marking this thread as resolved, due to inactivity from your side. Though you are always welcome to get back to us for further assistance if needed.

    Back to Front

    (@traverser11)

    Hi, just letting you know I have the similar issue of this plugin throwing an error in the console once the minification plugin (Siteground Optimizer) is active.

    Is there a specific file/url/something else I should exclude from the cache?

    the error message is
    Uncaught SyntaxError: expected expression, got '}'wp-login.php:998:1

    at:
    https://houseonfire.oldertenants.org.au/

    Hi @traverser11,

    Thank you for writing to us. Please know we need additional information on your issue, for which you are advised to write us at our support forum.

    Looking forward to your cooperation!

    Thread Starter mystyleplatform

    (@mystyleplatform)

    Note: SG Optimizer now has a “Exclude from HTML Minification” feature. If you add:

    /wp-login.php*

    It will not minify the login page, and thus the error will be gone from the console. This is not a fix for the issue as much as it is avoiding the cause.

    I think this should still be fixed so that minify can be used without any breakage, but until then, this is an easy workaround.

    Hi @mystyleplatform,

    Thank you for reaching out to us. Please note your issue is checked upon at our support forum and we will be waiting for your response on it.

    Have a great time!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Uncaught SyntaxError: Unexpected token ‘}’ on Login Page’ is closed to new replies.