SCRIPT1002: Syntax Error

Hey guys, im just going through my website and doing some debugging, removing errors and such and came across this one, just a problem with a missing closing script tag by the looks of it.

Something for the next update perhaps, im not sure where this is located to fix it up myself

Hello @njones7,

Thanks for asking. :slight_smile:

Can you please share website credentials in a secure note for us to take a closer look? Along with that please let us know where do you see error message that’s mentioned in the title of ticket.

Thanks.

Hey @Prasant,

This error can be seen on every page of my website https:///www.ptnu.com.au,

I can share website credentials but im not sure what you need them for.

It looks like it is being generated by cornerstone, in particular the JS editor.

Edit: I just realised i didnt actually paste the error (woops!), here it is

<script id="x-customizer-js"><script>

Hi,

You could try testing for a plugin conflict. You can do this by deactivating all third party plugins, and seeing if the problem remains. If it’s fixed, you’ll know a plugin caused the problem, and you can narrow down which one by reactivating them one at a time.

Let us know how it goes!

Deactivating all the plugins didn’t fix it

Hey There,

Would you mind providing us with login credentials so we can take a closer look? Please provide following information:

Set it as Secure Note

  • Link to your site
  • WordPress Admin username / password
  • FTP credentials

All the best!

How do i set it as a secure note? (nvm got it i think)

Hi,

You need to remove this code in Cornerstone > JS as it is causing a syntax error.

You can add it to your site by adding this in your child theme’s functions.php

function add_fb_code() { ?>
   ADD YOUR JS CODE HERE
<?php 
}
add_action( 'wp_footer', 'add_fb_code' );

Thanks

Did that, still getting a syntax error :\

Hello there,

I tried deleting the FB script on functions.php, cleared your style cache, disabled plugins, etcetera but none of them works.

This could be due to an error on your hompage. I suggest you save all your sections as a template, then delete your current homepage. After that, create a new one with the same name, and finally load the template to that new page.

Also, you currently have two versions of X theme installed. The one is 5.1.0 and the other one is the latest 6.0.4. I strongly recommend you backup x-copy folder and delete this on your server. The child theme will be confused on what parent theme to call.

The website is showing a Booked plugin PHP error:

Warning: array_diff(): Argument #2 is not an array in /home/ptnu4229/public_html/wp-content/plugins/booked/booked.php on line 1029

I suggest you submit a ticket to Booked support about this error. We’re sorry that we can’t give you an exact solution as this is a third-party plugin and doing bug fixes for this is not part of our scope.

Thank you.

Im on top of the booked error message, getting that resolved when people decide they actually want to help me there…

Im a bit lost with the two versions of X, one is definitely my child theme and the other is the original, the copy shouldnt be showing up…

If i click on X on the wordpress sidebar, it says my installed version is 6.04 but when i click on appearance > themes it says the active one is the child theme (as it should be) but it is version 5.01 as you mentioned… I was actually unaware of this before…why is this?

(i will look more into the home page script error more myself, thanks for your support on this one)

Hey @njones7,

@jumar was referring to two X versions in your site. Please delete the old version.

Though your child also has the 5.1.0 version number.

There’s no function in X that could change the child theme’s version number. It’s either manually changed by you or a developer or you have a function in your site that could change the child theme’s version number dynamically.

Thanks.

Im not looking to just change the file number. The “old version” i am using is my child theme that i use for the website. Every time there is an update for x theme i do it, but it looks like it is only updating the original X theme folder and not my child theme.

How would i update my child theme without having to delete it or go through the process of making a new child theme from the updated original?

EDIT: i found this other thread from you guys that says;

The purpose of the child theme is being able to update the main theme without the risk of losing the file customization you did from the theme files. Simply put, there is no need to update the child theme.

Hey There,

Thanks for letting us know that you have found out the answer you need. Yes, the child theme does not need to be updated. The child theme holds all your theme modifications to prevent your theme modifications from being overwritten when there is an update of the theme.

If you need anything else we can help you with, don’t hesitate to open another thread.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.