Critical JS Errors and Missing script.js Reference on Live Site

This topic has 8 replies, 2 voices, and was last updated 5 months ago ago by regencycigaremporium

  • Avatar: regencycigaremporium
    regencycigaremporium
    Participant
    July 21, 2025 at 02:44

    Hi XStore Support,

    I’m experiencing several issues on my WordPress site using the XStore theme. Here’s a summary of the problems:

    1. Missing JS File:

    The following script is referenced but does not exist:

    https://regencycigar.com/wp-content/themes/xstore/script.js?ver=2.0

    I’ve checked the directory /wp-content/themes/xstore/js/ and only found etheme-scripts.min.js and woocommerce-all-scripts.min.js. There’s no script.js, and this is causing browser console errors.

    2. Fatal Inline JS Error (base64-encoded):

    An inline base64 JavaScript string is throwing this error:

    Uncaught TypeError: Cannot read properties of undefined (reading ‘use’)
    at data:text/javascript;base64,…
    This script seems to be referencing wp.data.plugins.persistence, which is not defined in this context.

    3. Another Error in jQuery:

    Uncaught TypeError: Cannot create property ‘guid’ on string ‘https://regencycigar.com/’
    at Object.add (jquery.min.js:2:37833)
    This seems to stem from code improperly trying to assign properties on a string.

    These issues are affecting both front-end functionality and performance scores, and might also be hurting SEO. Could you please:
    1. Let me know if script.js is deprecated or if it should exist.
    2. Identify the source of the base64 script and how to remove or fix it.
    3. Advise if any of these are fixed in the latest version or if we’re missing an update.

    Thank you so much for your help!

    7 Answers
    Avatar: regencycigaremporium
    regencycigaremporium
    Participant
    July 21, 2025 at 06:21

    Update: These JavaScript issues began immediately after the recent XStore theme update, and they are now impacting both frontend functionality and SEO.

    We urgently need confirmation whether script.js was deprecated or removed, and help fixing the base64 and jQuery issues.

    Site speed has also degraded (TTFB much slower) since the update.

    All access credentials are already included in the private area.

    Please contact administrator
    for this information.
    Files is visible for topic creator and
    support staff only.
    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 21, 2025 at 11:52

    Hello @regencycigaremporium,

    Thank you for providing the details.

    We are currently investigating the issue and working on a solution. Please note that our theme does not include a script.js file, nor has it included one in any previous updates. However, we are checking whether any plugins might be attempting to load an incorrect path to a script.js file.

    Could you kindly confirm if any new plugins have been installed on your website recently?

    Best regards,
    The 8Theme Team

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 21, 2025 at 12:07

    Hello @regencycigaremporium
    Please, check now.
    Kind regards, Jack Richardson
    The 8theme’s team

    Avatar: regencycigaremporium
    regencycigaremporium
    Participant
    July 21, 2025 at 12:13

    Hi Jack and the 8Theme Team,

    Thanks for your quick response and your effort in checking the issue.

    Unfortunately, the errors are still occurring on the frontend. Here’s what I’m still seeing:

    1. jQuery Error
    (index):4 Uncaught TypeError: Cannot create property ‘guid’ on string ‘https://regencycigar.com/’
    at Object.add (jquery.min.js:2:37833)
    This suggests that some script is trying to call .guid on a string value, which is invalid. It may be trying to bind jQuery events on a URL instead of an object.

    2. Base64 JS Error
    Uncaught TypeError: Cannot read properties of undefined (reading ‘use’)
    at data:text/javascript;base64,…
    This base64 inline JS appears to be referencing:

    wp.data.plugins.persistence.use
    But wp.data.plugins.persistence is undefined in this context, leading to the crash. Could you please help identify where this base64-encoded script is being injected from?

    3. script.js Reference Still in Source
    Even though you mentioned script.js is not part of XStore, we are still seeing this being referenced:

    https://regencycigar.com/wp-content/themes/xstore/script.js?ver=2.0

    This reference is likely causing a 404, which affects page health and browser console. Could you confirm if a legacy file or plugin might be enqueuing this?

    These issues are affecting frontend functionality, console cleanliness, TTFB, and SEO scores.

    Would you be able to:

    1. Help trace and remove or patch the base64 script issue?
    2. Confirm what’s referencing script.js and how we can remove it safely?
    3. Provide any updated files or patches that can eliminate these JS conflicts?

    Again, thank you very much for your help — we appreciate your attention to these critical issues.

    Avatar: Jack Richardson
    Jack Richardson
    Support staff
    July 21, 2025 at 14:42

    Hello @regencycigaremporium,

    We hope this message finds you well.

    Upon reviewing your website, we have identified that the majority of the issues appear to be related to the current configuration of the WP Rocket plugin – particularly the settings for JavaScript delay and deferral. For your reference, please see the following screenshot: https://prnt.sc/Wc_IxxplbxXq.

    As a temporary measure, we have disabled these specific options to assess their impact. We kindly ask you to review your website and confirm whether the issues have been resolved.

    Additionally, we noticed that a CDN caching feature is active on your website. We would appreciate it if you could clear the CDN cache to ensure that all recent changes are properly reflected.

    Please note that we have implemented a fix for the main script using a custom code snippet created specifically for your site. You can view the snippet here: https://prnt.sc/zP-8Q4VLxl4t.

    Lastly, we would be grateful if you could clarify your request regarding the base64 issue, as we are currently unable to identify any related problems.

    Additionally we highly recommend you to check next reply and the steps shown there -> https://www.8theme.com/topic/wp-rocket-and-xstore-better-optimization/#post-450401.

    Thank you for your cooperation. Should you have any further questions or require additional assistance, please do not hesitate to contact us.

    Best regards,
    Jack Richardson
    The 8Theme Team

    Avatar: regencycigaremporium
    regencycigaremporium
    Participant
    July 22, 2025 at 01:05

    Thank you so much! That is super helpful

    Avatar: regencycigaremporium
    regencycigaremporium
    Participant
    July 22, 2025 at 01:05

    Thanks for the support! My topic “Critical JS Errors and Missing script.js Reference on Live Site” has been successfully resolved.

  • Viewing 8 results - 1 through 8 (of 8 total)

The issue related to '‘Critical JS Errors and Missing script.js Reference on Live Site’' has been successfully resolved, and the topic is now closed for further responses

We're using our own and third-party cookies to improve your experience and our website. Keep on browsing to accept our cookie policy.