• Hi, recently I got:

    frontend.min.js?ver=3.7.3:1 Uncaught ReferenceError: bodyElement is not defined
    at frontend.min.js?ver=3.7.3:1:13221
    at frontend.min.js?ver=3.7.3:1:15449

    The script is in
    wp-content/themes/astra/assets/js/minified/frontend.min.js?ver=3.7.3

    The error is is referencing ” “Safari” === v[0] && v[1] < 11 && bodyElement.classList.add(“ast-safari-browser-less-than-11”));

    Same issue when running Astra 3.7.6 (I downgraded to 3.7.3) and WP 5.8.3

    There is no caching plugin like WP Rocket running

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

Viewing 12 replies - 1 through 12 (of 12 total)
  • Hi Pjlam,

    var bodyElement = document.body; seems to be missing.

    Edit:

    This is for Astra 3.7.6 (free version)!

    var bodyElement = document.body;
    if( 'Safari' === M[0] && M[1] < 11 ) {
       bodyElement.classList.add( "ast-safari-browser-less-than-11" );
    }

    The code you shared is slightly different in your older version.

    • This reply was modified 2 years, 10 months ago by elisabeth01.
    • This reply was modified 2 years, 10 months ago by elisabeth01.

    Hi There! I just got the same error, but only on mobile resolution.

    I’m not sure how to implement Elizabeth’s solution since it is a minified js file.

    Uncaught ReferenceError: bodyElement is not defined
    at frontend.min.js?ver=3.7.6:formatted:357:39
    at frontend.min.js?ver=3.7.6:formatted:402:2
    (anonymous) @ frontend.min.js?ver=3.7.6:formatted:357
    (anonymous) @ frontend.min.js?ver=3.7.6:formatted:402

    It is increasing 1.6s the page loading time

    Please, help!

    Thanks!!

    Same console error here (astra 3.7.7.1). Yes, only on mobile resolution targeting on iOS.
    Error happens even ispecting Astra official website itself.

    @rafaeldplanet : you can add js with astra custom layouts (only astra pro), via astra hook plugin or in a child theme.

    Hi @pjlam,

    Please try to disable all of the plugins installed on your site temporarily and see if the errors disappear. If it does, then please reactivate the plugins back one after another until you noticed the errors come back. The last plugin you just reactivate could be the culprit.

    @rafaeldplanet & @clairedelacroix, please open your own thread. Although the problem may look the same, the root of the causes could be different. Feel free to cross-link your thread with this one so we are aware of both. In the meantime, please do what I asked to pjlam above.

    Please let us know how you go.

    Kind regards,
    Herman ??

    Hi Herman,

    disabled all plugin as debugging routine, js error is still there even with astra theme alone.
    I’ve also setted up a local enviroment, same error.

    It shows up in dev console (incognito mode or not) only emulating iOS devices, android and desktop are all fine.
    No performance issue.

    Could you please check it? Because I’m seeing it on almost every astra powered page posted here.

    Thank you.

    Same here

    Uncaught ReferenceError: bodyElement is not defined
        at get_browser (frontend.js?ver=3.7.7:61:30)
        at frontend.js?ver=3.7.7:62:1
        at frontend.js?ver=3.7.7:77:241
    get_browser @ frontend.js?ver=3.7.7:61
    (anonymous) @ frontend.js?ver=3.7.7:62
    (anonymous) @ frontend.js?ver=3.7.7:77

    I have the same problem. I disabled all plugins and the same error follows:
    Uncaught ReferenceError: bodyElement is not defined
    at frontend.min.js?ver=3.7.7:1:14048
    at frontend.min.js?ver=3.7.7:1:16276

    So, this error can be seen only on iOS devices? Can you guys please confirm this?

    Kind regards,
    Herman ??

    I have a Macbook with OS X Big Sur, I tested it in Firefox and Safari in responsive mode using the inspector and this error only happens in Chrome in mobile mode, in desktop mode it works normally.

    Hi guys, I would like to share an update with you that we were able to replicate this issue. We will fix this ASAP. Thank you for reporting this and we are also sorry for the inconvenience.

    Kind regards,
    Herman ??

    Ok Herman (@bsfherman),

    Thanks for the feedback.
    If you can let me know about the update I would appreciate it.

    Greetings.

    Hi guys,

    Just wanted to update you guys that the issue has been fixed on v3.7.8. Please confirm on your end that the issue has been solved.

    Kind regards,
    Herman ??

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Uncaught ReferenceError bodyElement is not defined’ is closed to new replies.