• Resolved ravi121923

    (@ravi121923)


    When I am logged into admin panel, visiting homepage of the website.

    In console, I see 2 errors.

    Uncaught SyntaxError: Identifier ‘swcfpc_ajax_url’ has already been declared (at ?swcfpc=1:988:7)

    backend.min.js?ver=1.6.0:1 Uncaught ReferenceError: swcfpc_cache_enabled is not defined
    at swcfpc_update_toolbar_cache_status (backend.min.js?ver=1.6.0:1:12453)

    How to solve these?

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

Viewing 6 replies - 1 through 6 (of 6 total)
  • Hey,

    It looks like the script was double enqueuing. On the page with the issue, you can run this code snippet in the Browser Console:

    document.querySelectorAll('[id^="swcfpc_admin_js"]').forEach(e => console.log(e))

    It should look like this when you run it:

    If not, we kindly ask you to post a screenshot of the result and mention if you’re using any plugins that optimize the JavaScript.

    Thread Starter ravi121923

    (@ravi121923)

    Here is the output: https://imgur.com/FcntUnr

    I do use litespeed cache plugin

    Thanks for the confirmation. The fix should come in the next release.

    Thread Starter ravi121923

    (@ravi121923)

    Is there any update coming for this fix?

    Plugin Support Ionut Neagu

    (@ionutn)

    Hey,

    Yes, but with this not being a widespread issue, we’ll be waiting to bring multiple improvements and fixes together, so it would be out in around a week.

    Plugin Author Optimole

    (@optimole)

    We just released a new version that fixed this.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Javascript error in latest version – 5.0.1 and 5.0.0’ is closed to new replies.