• Resolved adnanshawkat

    (@adnanshawkat)


    Hi there,

    All other sites are working perfectly but this is the only site where the theme is causing issues. It’s showing an error on the console log. Can you please check & let me know what’s going on here?

    
    main.js:5 Uncaught ReferenceError: ct_localizations is not defined
    

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

Viewing 8 replies - 1 through 8 (of 8 total)
  • Hi @adnanshawkat

    It seems that you have a plugin that transforms a regular script tag into a JavaScript Module definition: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Modules

    How the script should look normally: https://cln.sh/A10lag
    How the script looks on your site (type=“module” added): https://cln.sh/d4IN8w

    When a piece of JS is placed in a script with type=”module”, the variables defined are scoped inside it, and outside JS can’t reference it. That’s why our main JS files fail — they don’t see the ct_localizations variable globally (because you’ve scoped it into a module).

    You’re not supposed to just freely transform all the regular scripts into a module ones, because it can break your site and that’s exactly what happened in the situation we’re facing now.

    Hope this helps.

    Thanks

    • This reply was modified 3 years, 4 months ago by strelok1911.
    Thread Starter adnanshawkat

    (@adnanshawkat)

    Hi there,

    But I don’t have any plugin installed only the theme & breeze plugin that’s it. Breeze is installed for cloudways cache but no modification or anything has been done so far. Using Cloudflare for DNS & its free cache only. Secondly, I’ve been using such a system for my other sites & running perfectly in this case. Can you provide or want to see if there’s anything else that might be causing the issue?

    Thread Starter adnanshawkat

    (@adnanshawkat)

    Also, it seems we’re having issues with another site africa.se – Staging URL it’s new though & I can say we’re having zero things going on with the site. Like we’ve only Cloudflare enabled & nothing else no other plugins are installed except breeze which is also used for purging varnish cache. No modification or anything is done there. Can you please check this?

    Theme Author creativethemeshq

    (@creativethemeshq)

    In case on your other websites the same setup is working fine but on these two sites it’s not working – this should be a caching issue or a server issue on these particular sites.

    Thread Starter adnanshawkat

    (@adnanshawkat)

    Other themes seem to be working perfectly like kadence or astra. Anyway, I’ll stick with kadence for these 2 domains.

    Regards

    Theme Author creativethemeshq

    (@creativethemeshq)

    @adnanshawkat It’s hard for us to guess what is the difference between the two domains just by looking at the HTML output.

    But, if it’ll tremendously help if you could reply back with the URL to:

    1. a site with Blocksy active where this doesn’t happen
    2. a site with Blocksy is active where the above issue happens

    If you’ll provide these here, we’ll have a look at them right away and we’ll let you know the difference.

    Also, now that you’ve activated Kadence on your domain, it looks like you made some changes to the overall configuration too, because the type="module" doesn’t show up on your scripts anymore: https://cln.sh/x4a0mw

    That’s the reason why Kadence/Astra now works and Blocksy didn’t worked previously.

    We’ll be more than happy to push a fix for this from our side, if we are able to confirm that this is indeed caused by Blocksy, but with the info we have so far it looks like this is not the case.

    Waiting for your reply with more details and thanks in advance for all the cooperation!

    Thread Starter adnanshawkat

    (@adnanshawkat)

    To be honest bro I haven’t changed any code just activated the theme & designed the blog accordingly that’s it. Nothing extra taken care of. Don’t know why that happened with blocksy I do love it. The site is live now so for now it’s ok to keep it as it is.

    Theme Author creativethemeshq

    (@creativethemeshq)

    @adnanshawkat Yes understood but something did added the type="module" to your script tags, that doesn’t happen automatically out of the box for sure. This was the thing that caused the initial incident.

    Happy to hear you were able to find something that works out well for yourself though!

Viewing 8 replies - 1 through 8 (of 8 total)
  • The topic ‘Data not showing in public view’ is closed to new replies.