**Fatal error** : Uncaught Error: Call to undefined function cs_get_raw_excerpt

Hi

I have the following error and believe its something to do with a function no longer existing. however, I have no idea how to resolve. Can you please support me with this?

Thanks

Fatal error : Uncaught Error: Call to undefined function cs_get_raw_excerpt() in /home/customer/www/elasticlounge.com/public_html/wp-content/themes/x-child/functions.php:77 Stack trace: #0 /home/customer/www/elasticlounge.com/public_html/wp-includes/shortcodes.php(355): x_shortcode_share_v2(Array, ‘’, ‘share’) #1 [internal function]: do_shortcode_tag(Array) #2 /home/customer/www/elasticlounge.com/public_html/wp-includes/shortcodes.php(227): preg_replace_callback(’/\[(\[?)(share)…’, ‘do_shortcode_ta…’, ‘[share title="S…’) #3 /home/customer/www/elasticlounge.com/public_html/wp-content/plugins/cornerstone/includes/shortcodes/raw-content.php(18): do_shortcode(’[share title="S…’) #4 /home/customer/www/elasticlounge.com/public_html/wp-includes/shortcodes.php(355): x_shortcode_raw_content(’’, ‘[share title="S…’, ‘x_raw_content’) #5 [internal function]: do_shortcode_tag(Array) #6 /home/customer/www/elasticlounge.com/public_html/wp-includes/shortcodes.php(227): preg_replace_callback(’/\[(\[?)(x_cust…’, 'do_shortcode in /home/customer/www/elasticlounge.com/public_html/wp-content/themes/x-child/functions.php on line 77

Hi @Basstimg,

Thanks for reaching out.
I would suggest you rename the child theme folder through FTP and activate the parent theme once. If you still have the same issue, there might be some different reasons behind it. I would like to suggest troubleshooting the following common issue to help us to recognize the reason.

1.Theme Related Issue
2.Plugin Conflict
3.Theme Update related issue
4.Child Theme Related issue ** if you have activated it.
5.CSS/JS Customization
6.Disabling Cache
7.Disabling CDN

If you discover that an issue is coming from a custom code or 3rd party plugin, kindly consult with a developer or contact the plugin author. Please note that we do not provide support for custom codes and 3rd party plugins.
If none of the above helps, you have to provide login credentials for your site in a secure note to examine it further, including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Thanks

Hi

Thanks for the thorough message.

I have checked and not able to find any of the issues you mention. I currently have all the plugins deactivated and still the same. I have added my login in in a secure note. I appreciate the support

Thank you

Hi @Basstimg,

I have reinstalled the Cornerstone and your website is working fine. It seems that you might have a problem with your modified child theme. If you still want to use the child theme, I would suggest you hire a developer who can assist you with this or you can avail of our newly launched service called One, where we answer the questions beyond the normal theme support.

Thanks

Thank you for your email I can see there there is some functionality on the site that has returned but there remains the same error on the home page and new errors have presented on other pages.

The site was built using cornerstone but It is not allowing me to edit any pages with cornerstone. Do you know why that is?

If I chose to get ONE service do you believe the service would be able to identify the issue and support me to resolve it?

Thanks

Tim

Hello Tim,

You will have to disable the WP Debug mode.

Please also go to Tools > Site Health > Info. Make sure to resolve any performance issues.

And lastly, in your first post, the error is actually giving us much more information about the issue. It says that in line 77 of your child theme’s functions.php file, cs_get_raw_excerpt() is undefined function. If we go to Appearance > File Editor and select functions.php file, the line 77 is having this:
$share_content = urlencode( cs_get_raw_excerpt() );

I see that you have corrected it already into this: $share_content = '';//urlencode( cs_get_raw_excerpt() );.
It should be fine now. Just make sure to disable the WP Debug mode so that those PHP Warnings in your homepage will no longer display.

Best Regards.

Hi

I have checked my file manger in Cpanel and the WP debug mode is already disabled?

Any ideas as I wasn’t; expecting it to be already done?

Thanks

TIm

Hey Tim,

In your wp-config.php file, instead of using define('WP_DEBUG_DISPLAY', false);, please update it with the following code.

ini_set('display_errors','Off');
ini_set('error_reporting', E_ALL );
define('WP_DEBUG', false);
define('WP_DEBUG_DISPLAY', false);

Here’s the reference: https://www.wpbeginner.com/wp-tutorials/how-to-turn-off-php-errors-in-wordpress/

Hope that helps.

Thank you that worked but I am still unable to edit the site with cornerstone?

The site was built with cornerstone and now a lot of x theme standard functioning elements are not working and because it won’t let me open in cornerstone I have no way of investigating or updating.

It won’t even let me build a new page with cornerstone it just won’t load anything.

Can you assist?

Hello There,

Please update your Ninja Form and add on plugins. The outdated JS file in the plugin may be having a conflict with the builder. It is also recommended to update your PHP to at least PHP 8.0.

Kindly let us know how it goes.

Hi,

I have completed both task and have updated ninja forms and also the PHPm for the site.

Cornerstone continues to spot work and even if I deactivate ninja forms it does not work.

Can you assist please?

Thanks

Tim

Hello Tim,

Your Siteground Optimizer plugin is causing the issue. I have temporarily deactivated it and I can edit your homepage already. And also, the X – Google Analytics is already outdated. Please delete and download the latest version in X > Validation > Extensions.

Best Regards.

Hi

Thanks I can now edit using cornerstone.

I deleted analytics but now it is still showing as installed in validation- Extensions.

Hey Tim,

We’re glad that you’re now able to use the Cornerstone. About the analytics, maybe it is just a a cache because once the plugin is deleted, you cannot see it anymore on your dashboard.

Thank you.

Hi I have been chatting to the ninja forms developer and still have issues with activating the plugin.

Trying to resolve the issue they have asked me to activate all plugins and change the theme to one as a test. As soon as I try to do this it throws a fatal error, this is not normal WP functionality and shows there is an issue with the theme in some way. Could’t you investigate please?

Hi Tim,

Although this is a 3rd Party plugin issue and we don’t have any control over the code, we are still curious to know why the issue only persists with our theme. To investigate, I would suggest you please copy your live site to a staging server so we could troubleshoot freely without breaking your live site.
And give us access in the secure note including:

– WordPress Site URL & Login URL
– WordPress Admin username/password

To create a secure note, click the key icon underneath any of your posts.

Please note that we do not guarantee a fix or compatibility for 3rd Party plugins.

Thanks

Thank you for the message.

I totally understand that you can’t guarantee resolving the 3rd party plugin there is also the issue that with all plugins deactivated isn won;t let me change themes which is related to Theme x functionality.

I have created a staging site and added the login details in a secure note

Hi Tim,

I have tried to access your WordPress admin URL but it shows Critical Error. Can you please check and let us know once it is accessible? I would also request you provide the FTP/CPanel credentials to access the files.

Thanks

Hi

I’ve spoken to my hosting company and they have responded saying the issue is due to it needing a licence key. You can access the site admin for the staging site via my hosting account.

I will attach login and full response in the secure note

Hello @Basstimg,

I have set up your license key for staging 2. When I tried editing the homepage, I could not replicate any issue:

Can you please provide us a screenshot when you are in the Cornerstone builder? By the way, if you had previously built a page with the Classic Elements, you have to make sure that in Cornerstone > Settings > Permissions > Elements, “All Classic Elements” is enabled.

Best Regards.