ReferenceError: csAppConfig is not defined wordpress 5.8.1

app.e521902.js:2 Uncaught (in promise) ReferenceError: csAppConfig is not defined
    at app.e521902.js:2
    at HTMLDocument.<anonymous> (app.e521902.js:2)
(anonymous) @ app.e521902.js:2
(anonymous) @ app.e521902.js:2

The issue is not related to minify/combine or cache plugins, as they have been disabled during conflict troubleshooting.

Cleared redis cache
Resaved permalinks
Cleared Cornerstone cache.
No success.

Hello Mike,

Thanks for writing to us.

This issue generally happens due to the HTML, JS/CSS customization or minification, or CDN cache. I would suggest you troubleshoot with a few of the common issues before we investigate your settings.

  1. Testing For Theme Related Issue
  2. Testing For Plugin Conflict
  3. Theme Update
  4. Child Theme
  5. Css/Js Customization
  6. Increasing Php Memory Limit
  7. Disabling Cache
  8. Disabling Cdn
  9. Permalinks
  10. Version Compatibility

If it doesn’t work for you please follow these steps

  1. Activate the default WordPress theme
  2. Delete the X/Pro theme from the server
  3. Download the fresh copy of the X/Pro theme from the Themeco Dashboard.
  4. Reinstall the X/Pro theme to your server
  5. In case if you are using X theme delete the Cornerstone plugin and reinstall it.

If none of those work, It would be best if you could copying your live website to your staging area. and send your details in a secure note so that we can investigate your setting without breaking your live site. Please provide the following details

  • WordPress Login URL
  • Admin level username and password
  • FTP Details

You can find the Secure Note button at the bottom of your posts


Template answer, I already said I tested plugin and child theme conflict. I already mentioned performance/cache plugin wp rocket was disabled.

Cleared cache and flushed permalinks. Php memory limit is 512mb.

Solved it. But builder seems a bit slow once clicking around, especially clicking on the breakpoints. And I see:

3thickbox.js:304 Uncaught ReferenceError: TB_WIDTH is not defined
    at tb_position (/wp-includes/js/thickbox/thickbox.js:304)
    at media-upload.min.js:2
    at dispatch (jquery.min.js:2)
    at v.handle (jquery.min.js:2)

2thickbox.js:304 Uncaught ReferenceError: TB_WIDTH is not defined
    at tb_position (/wp-includes/js/thickbox/thickbox.js:304)
    at media-upload.min.js:2
    at dispatch (jquery.min.js:2)
    at v.handle (jquery.min.js:2)
    at app.e521902.js:2
    at Bh (react-dom.min.js:126)
    at Dj (react-dom.min.js:162)
    at unstable_runWithPriority (react.min.js:25)
    at Da (react-dom.min.js:60)
    at xb (react-dom.min.js:162)

thickbox.js:304 Uncaught ReferenceError: TB_WIDTH is not defined
    at tb_position (/wp-includes/js/thickbox/thickbox.js:304)
    at media-upload.min.js:2
    at dispatch (jquery.min.js:2)
    at v.handle (jquery.min.js:2)

Hi Mike,

Is that issue is resolved in your Live server, I just went ahead and checked your staging server and found the same issue you described earlier. If that still exists, I would suggest you to deactivate and delete Pro and reinstall it by downloading from your Theme Account and check if that issue exists or not.

Hope it helps.

Live server is using an old PRO version as it still contains too many bugs for me with the conditions for header builder. Above issue was on staging, can you share in a secure note where you see the issue?

Hey Mike,

I deactivated your child theme and the csAppConfig issue went away and the builder is loaded (see 1st screenshot in the secure note)

Also, I don’t see the JS error you’ve posted and the builder is loading fast. All I see are 404 errors that are not related to the builder (2nd screenshot)

I know you’ve tested for a plugin conflict but on your staging, would you mind deactivating all 3rd party plugins and using the parent theme, record a short video of the lag you’re referring to and then show the JS error.


404s you see is because some plugins is disabled which rewrite slugs. So these you can ignore.

Ok you say you saw the csAppConfig issue once child theme was activated? What in the child theme could be causing it?

The video doesn’t seem relevant as you say you see the issue and it’s coming from the child theme functions.php file I assume?

I do though see csAppConfig issue as it is right now. Sometimes works with a hard reload but not all the time. Parent theme is activated, so please guide me where the problem is as it doesn’t seem to be child themes function.php?

Hello Mike,

Please go to Tools > Site Health > Status. Please make sure that you resolved all the performance issues especially the Post Max Size and Upload Max Size as this could also affect the loading of the builder.

We have checked your Child theme and there are several custom PHP blocks that may have caused the issue like this block;

//* Remove Query String from Static Resources
function remove_css_js_ver( $src ) {
if( strpos( $src, '?ver=' ) )
$src = remove_query_arg( 'ver', $src );
return $src;
add_filter( 'style_loader_src', 'remove_css_js_ver', 10, 2 );
add_filter( 'script_loader_src', 'remove_css_js_ver', 10, 2 );

It is best that you temporarily remove the custom PHP blocks and add them back one block at a time so that you will know which block is causing the issue.

And you may have a broken template file that must be relocated. For example, the _brand.php file should be relocated to wp-content/themes/pro-child/framework/legacy/cranium/headers/views/global/. You will need to create the folder path in your child theme because it does not exist yet.

Best Regards.

Thanks, I will investigate, allow me a couple of days.

The child theme relocated when was this done, any documentation about this?
Might have plenty of legacy code in the child theme, even the old from original builder to PRO. That I would have to go through. But should all code from here be moved or deleted? public_html/wp-content/themes/pro-child/framework There is as said most probably a lot of code which is legacy and not even used due to changes of the builder from the old days. Like:


// =============================================================================
// -----------------------------------------------------------------------------
// Outputs the brand.
// =============================================================================

$site_name        = get_bloginfo( 'name' );
$site_description = get_bloginfo( 'description' );
$logo             = x_make_protocol_relative( x_get_option( 'x_logo' ) );
$site_logo        = '<img src="' . $logo . '" alt="' . $site_description . '">';


<a href="<?php echo home_url( '/' ); ?>" class="<?php x_brand_class(); ?>" title="<?php echo $site_description; ?>">
  <?php echo ( $logo == '' ) ? $site_name : $site_logo; ?>

Let me know so I know when I proceed. I will most probably need ask about certain legacy code.

But also note I see this even when I switch to parent theme so the code in child theme is not active.
Post Max Size and Upload Max Size was resolved without any improvements.

Hi Mike,

Not sure what problem you are having with the _brand.php from your child theme, but it shows a much older code which might be the reason behind your issue. If you have not modified these files, I would suggest you copy the file from the parent and replace it or remove it so it will be taken from the parent theme only.
Please let us know if that resolves your issue.


Better let your previous colleague answer then as you jump in while you don’t know what the problem is.

This was a very no effort answer. We have tested activating the parent theme only to solve our second ticket which didn’t solve anything there. So kindly focus on that ticket where you missed looking into the core issue, and let another support staff handle this ticket.

I will need to go through all these legacy code but if you even read my thread above you would have answer several of question which was addressed. When did this change happened to move the files, where is the documentation about it etc.

I have much better answers from other staff, so please kindly let another agent handle my issues as you never target the issue and read everything to address the issue. It’s not about answering as many tickets as possible its about trying to solve them.

Hi Mike,

Sorry for the confusion. I have already read the comments in the thread and answered you based on that. The last answer was very particular to the _brand.php file which shows much older code respective to the latest version of the theme. That means the other files are also need to be changed accordingly. Also, there is no specific documentation on the child theme and the legacy code which I can refer to you.

I would suggest you either remove the public_html/wp-content/themes/pro-child/framework folder completely, or you can replace files with the latest version of files from the Parent theme.

Hope it helps.

What I wondered was where the no documentation that the file path should be relocated as mention here:

I will obviously need to look at all the custom code to check what can be deleted or what I need help finding out what it was used for etc and what looks odd when removing etc. So I can clean it all out.

Hi Mike,

Unfortunately, there is no such documentation that I can refer to you. Please let us know if you need any further help on this.


Okay, what I found strange was there was a change that need to be done but no information or documentation about it?

Hi Mike,

These changes were done in the recent release as we have moved the templates to pave a way for the header footer, footer builder, and layout builder. Since you are using the Pro theme, the _brand.php file is not needed in your child theme. With the help of the Header Builder, you can always create your own custom header and display it in the design that you want it to look like.

Best Regards.

Sure I will look into removing these, should I remove all folders in the child theme? I will of course backup and test one by one. But non of the files there is needed meaning legacy build?

Hello Mike,

It is best that you compare your modified template files that are present in your Pro Child theme and the template files located in the parent theme’s wp-content/themes/pro/framework/views and in wp-content/themes/pro/framework/legacy/cranium/headers and/or wp-content/themes/pro/framework/legacy/cranium/footers. If the location of the file is in the legacy folder of the parent theme, the file in your child theme must also have the same folder location to prevent any issues or conflict.

Best Regards.