Hey @qbey!
Thanks for reaching out, and I’m really sorry about the conflict here! We’d love to help troubleshoot to get to the bottom of it.
We did some initial tests but were unable to replicate the issue. This could be for numerous reasons, but probably because we don’t have the same theme + plugins installed as you do.
Autoptimize has a setting to exclude scripts from being optimized. I’d like to see if you exclude ours if it makes any difference.
Please go to Settings > Autoptimize > Javascript Options and find the section entitled: Exclude scripts from Autoptimize. Then just add the following: aioseo/js/src to that list.
Let me know if that fixes the issue for you! If so, we will work to get this permanently resolved inside our plugin.
And just for peace of mind, our scripts only load when you are logged in to the site and not for visitors. These scripts are for rendering the SEO SERPs preview on the front end of your site while you are auditing your pages.
Thread Starter
qbey
(@qbey)
We did some initial tests but were unable to replicate the issue.
As I said, it occurs even on default wordpress themes without any other plugins.
I am replicate this issue again right now on my local server (PHP 7.4.5) with a fresh pure wordpress and only two plugins installed, and as expected it happened again.
Please go to Settings > Autoptimize > Javascript Options and find the section entitled: Exclude scripts from Autoptimize. Then just add the following: aioseo/js/src to that list.
When you will try to reproduce the issue again, don’t forget to enable CSS optimization, not just install Autoptimize. HTML or JS optimiztion does not trigger the issue, it occurs only when CSS optimization is active. Which is really weird, because it’s just CSS… So, of course it didn’t help at all, as JS optimiztion isn’t even required to be enabled to reproduce the issue.
-
This reply was modified 2 years, 10 months ago by
qbey.
Thread Starter
qbey
(@qbey)
Important addition.
The issue occurs only on RU version of WordPress. Tested it again but with EN version and here all is ok. Both versions are official, downloaded directly from the WordPress website.
-
This reply was modified 2 years, 10 months ago by
qbey.
-
This reply was modified 2 years, 10 months ago by
qbey.
@qbey,
Thanks for the update and that info. We were able to reproduce it using the RU version of WordPress.
It turns out that our translated strings are too long for a preg_replace_callback function that Autoptimize uses when optimizing comments and that causes the entire page content to return NULL which is why it’s blank for you. This is definitely a limitation within the Autoptimize plugin, but we are hoping to find a way to fix it on our end if possible.
With that in mind, until a fix is available I’ve prepared a quick code snippet you can add to your functions.php file (or using a plugin like WPCode):
add_action( 'wp_print_footer_scripts', function() {
if ( is_admin() ) {
return;
}
wp_deregister_script( 'aioseo/js/src/vue/standalone/app/main.js' );
}, '9.5' );
This isn’t a great permanent solution because it disables our translations on the front end of the site in the SEO Preview module.
We have a few ideas for how we can fix it from our end, but we also plan to reach out to the Autoptimize team to see if they can adjust the way they process the data on their end so this issue doesn’t occur in the future with any other plugins.
Thanks again for reporting this and we’ll reach out as soon as we have a permanent solution!
Hi @qbey,
I wanted to let you know that we released All in One SEO version 4.5.3.1 today which fixes this issue that you reported.
Please let us know if you’re still experiencing any issues and we’ll be happy to help you.