Perfmatters JS Delay Issue

Hi, I am using the plugin Perfmatters. There is a setting to “Delay” JavaScript. IF this is enabled, it DOES NOT allow the Wordpress admin to load the cornerstone visual editor. The admin can see the editor panel, but cannot see the live preview within the editor. It will just keep showing the loading bar. In the Perfmatters plugin, there is the ability to EXCLUDE certain JS files. I have tried to exclude every JS file that I can find, but I still cannot get it to work. Is there something I’m missing? here are the files I’m excluding:

/wp-content/themes/pro/framework/dist/js/site/x.js?ver=*
/wp-content/themes/pro/cornerstone/assets/js/*
/wp-includes/js/codemirror/*
/wp-admin/js/*
/wp-includes/js/*
/wp-admin/js/*

Hello @calebja,

Thanks for writing in!

You can just exclude this whole folder:
/wp-content/themes/pro/framework/dist/js/site/*

Hope this helps.

Hmm, this did not work. Are there any other JS files anywhere that are not included in the framework folder?

Hey @calebja,

Would you mind sharing your admin credential so that we can take a closer look? Just want to let you know that this issue is fall outside the scope of our theme support because it involves customization and our builder working out of the box without this functionality but we would love to check the console log. Please give us the following information in a Secure Note.

  • WordPress Login URL
  • Admin level username and password

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

Thank you.

Hi, thank you, but I’ve actually figured it out. As of the time of writing, Perfmatters said that I need to implement a PHP script to block one of their functions from starting when the Cornerstone builder is loading. For anyone looking here in the future, the script needs to be added to the theme’s function.php file. Create a child theme.

if(strpos($_SERVER[‘REQUEST_URI’], ‘/cornerstone/’) || isset($_POST[‘cs_preview_state’])) {
add_filter(‘perfmatters_allow_buffer’, ‘__return_false’);
}

Hey @calebja,

We’re glad that you’re able to figure it out and thanks for sharing.

Thank you.

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