500 error when inlinecss and js is enabled
-
Hi, Frank its been a while I hope everything is good, well this issue I think I posted about it but long time ago but I have new info / approach : even using the filter to disable in a specific template (after it is enabled in global AO settings) it is returning the 500 error in the console though the page loads fine. This is the filter and code I’m using
function disable_autoptimize_inline_on() {
if ( is_page_template( 'single_actividades.php' ) ) {
add_filter( 'autoptimize_html_minify_inline_js_css', '__return_false' );
}
}I tried on localhost on my site setup to verify the filter actually worked and it did (had some code snippets that if I comment the above function/filter it does indeed minify them) and no errors then.
So thats what weird is that I was expecting that just by using the filter which excludes it from minify those pages (single pages) it would prevent the error from happening but it didn’t. And I think this error is important for SEO, while having the preference enabled is great for speed.
Also what I can do in order to further debug is replicate an activity single page with password in order to prevent it from being included in the loop for the live pages, and then modifying the filter to use the ID of the page.
Kind Regards
- You must be logged in to reply to this topic.