Language switch in cornerstone giving an error v2

Since the other topic was already closed.

See this: https://theme.co/apex/forum/t/language-switch-in-cornerstone-giving-an-error/53016

We’re using all the current updates on the live version and the error still persists. Also we’re using Pro theme.

I updated the local system to the newest version too for you to see.

Hello @PixelProduction,

Thanks for writing in!

In your child theme, you have this code:

// scripts
function pixel_enqueue_script()
{
	wp_enqueue_script( 'pixel-script', get_stylesheet_directory_uri() . '/js/pixel-power.js', false );
}
add_action( 'wp_enqueue_scripts', 'pixel_enqueue_script' );

The code above loads a JS file. The problem is that this file is creating a JS error on the page which affect Cornerstone. Please correct this file to avoid any errors and conflict:

    at pixel-power.js?ver=5.0.3:23
(anonymous) @ pixel-power.js?ver=5.0.3:23```
 
Meanwhile, I can confirm that the Cornerstone will not loaded because of the JS error or frame error. I would recommend that use the <a href="https://theme.co/changelog/#cornerstone-1-1-0" target="_blank">skeleton mode</a> instead to edit the page for faster response and easy access of the elements on the preview area. 

<img src="//tco-forum-uploads.s3.amazonaws.com/original/3X/1/e/1ec1161e15107ea4acca474c3d92c7f9ac023565.png" width="503" height="500">

Hope this helps.

Hi.

I disabled the wp_enqueue_script and switching the languages is still giving the error.

Hello @PixelProduction,

After a thorough investigation, it turns out that this a conflict when string translation is active. Our developers were already made aware of this issue and already have fixed the issue. We already have the release candidate RC3 which contains the fix for this issue. You may install the release candidate or simply wait for the official update release which will be out in the next few days.

Please bear with us.

Thanks RueNel.

Glad to hear that it got fixed.

On behalf of my colleague, you’re welcome. Cheers! :slight_smile:

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