My site broken since Cornerstone/Theme Update

Hi

My site is giving all sorts of errors since I updated it to the most recent version of cornerstone. I have received a ‘fatal error’ message on my wordpress site from wordpress. Here’s the details of the error:

Error Details

An error of type E_PARSE was caused in line 120 of the file
/home/jamiehar/public_html/jamieharrisonguitar/wp-content/themes/x-child/api.php.
Error message: syntax error, unexpected ‘’’’
(T_CONSTANT_ENCAPSED_STRING)

Please tell me what I can do and what is causing this issue. I will send secure note with login details.
Thanks a lot
Jamie

Hello Jamie,

Thanks for writing in!

Can you please let me know the website URL in question here? I checked both the URL’s that’s listed in your licence manager and login details that’s shared in ticket is working for both of them. Further checking the website I see one is updated to latest version of X Theme and Cornerstone while other one is still using old version. Having said that I don’t see the error message getting reflected on the website. Can you please confirm?

Looking at the error message, it seems that issue is coming from changes made in Child theme. Under Appearance > Themes activate parent X Theme and then test the same again and see how it goes. If problem gets solved then the you need to narrow down the changes that’s there in child theme to fix the error message.

Thanks.

Hey, the site in question is Jamieharrisonguitar.com

Hey Jamie,

I’ve tried enabling the parent theme which resolves all errors so I would recommend going through the child theme and see where the issue is coming from. Since the child theme is having custom code and it has nothing to do with the core functionality of the theme you will need to take a look at this and if you are stuck we can try to guide you in the right direction. Please make sure to provide the code of the api.php document when needing advice. I am looking forward hearing from you.

Hey Rubin, thanks for doing this - but I’ve never changed any code in the child theme so I would have no idea where to even start… How could something have gone wrong on it if I never changed the code? Thanks a lot
Jamie

Hi Jamie,

That’s the thing, this file (https://www.jamieharrisonguitar.com/wp-content/themes/x-child/api.php) or a function on that file is causing an issue with the latest version, might not only with the Theme but might be with the Wordpress itself. Please contact the developer who made that document and ask to address the issue to adhere to the latest version.

And like Rubin said above, if you are stuck we can try to guide you in the right direction, but please provide the content of that api.php document. Or provide us FTP credentials in a secure note.

Thanks,

I built the site myself so have no developer to ask about this file. Like I said however, I didn’t change anything in that file, or add any code to the theme - my development experience is nowhere near that level so I wouldn’t dare messing around with this. I’m attaching a secure note with my FTP details. It would be great if you could take a look because my site is causing a lot of problems, and I’m losing sales and customers.

Thanks
Jamie

Hi @jamie2364,

You mean you have developed the api.php? Because it’s never part of the theme and we don’t maintain custom codes.

But if those codes aren’t important and not created by anyone. Then I recommend just installing a clean child theme :slight_smile:

I also checked api.php and I myself is not sure what’s that error about, because on line 120 is just $user_id = $request['user_id'];, and I don’t see any issue that will cause that issue. This is not caused by cornerstone or updates.

Thanks!

I never created any ‘api.php’. I don’t even know what that is?
Would some plugin have created that page maybe?

Also, I just got yet another error notification:

An error of type E_PARSE was caused in line 655 of the file /home/jamiehar/public_html/jamieharrisonguitar/wp-content/themes/x-child/api.php. Error message: syntax error, unexpected ‘=’, expecting ‘;’

Can you see any issue there?

Hello @jamie2364,

By default, when you use X Child, you only have screenshot.png, style.css and functions.php file.

Since you never created the api.php, you can safely detele it.

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