Thread Starter
Aaron
(@jstask)
@codersantosh a response on how I could reset the plugin, or get rid of those 404s would be much appreciated.
I really like the plugin and the themes you sell through it, I would consider spending money on a pro version, as mentioned in your roadmap, if I could use it without errors.
Hello @jstask ,
It seems like the issues come from some cache plugin or maybe server cache. It is because before loading the dynamic CSS file Gutentor first checks if the file exists( with file_exists ).
Can you please check on that?
Best Regards!
Thread Starter
Aaron
(@jstask)
In addition to turn off caching, I disabled the caching plugins completely, and did a copy to my local machine, to exclude server caching issues. The MIME type errors are gone, not the 404 for the same files, because the files Gutentor tries to load don’t exist in my uploads folder (/app/uploads). I also don’t use any Gutentor Blocks at the moment, only the plugin is activated. I also tried altering the Gutentor optimization settings, but it tries to load those non-existing files anyway.
Maybe the error is caused by the file_exists function? My folder structure is different from the default one since I am using https://roots.io/bedrock/
Hello @jstask ,
Just wondering if the issue goes after deactivating the Gutetor?
Best Regards`
Thread Starter
Aaron
(@jstask)
Sure, if I disable Gutentor no missing CSS calls are made.
@jstask can you please let me know if you are using reusable block?
Thread Starter
Aaron
(@jstask)
I think I got you.
Can you please replace the code of the plugin file gutentor/includes/hooks.php
https://plugins.trac.ww.wp.xz.cn/browser/gutentor/trunk/includes/hooks.php#L831
Line 831 to 837
if ( $reusable_blocks ) {
$upload_dir = wp_upload_dir();
foreach ( $reusable_blocks as $reusable_block ) {
$css_info = get_post_meta( $reusable_block, 'gutentor_css_info', true );
wp_enqueue_style( 'gutentor-dynamic-' . $reusable_block, trailingslashit( $upload_dir['baseurl'] ) . 'gutentor/p-' . $reusable_block . '.css', false, isset( $css_info['saved_version'] ) ? $css_info['saved_version'] : '' );
}
}
with the following code below:
if ( $reusable_blocks ) {
$upload_dir = wp_upload_dir();
foreach ( $reusable_blocks as $reusable_block ) {
if ( file_exists( $upload_dir['basedir'] . '/gutentor/p-' . $reusable_block . '.css' ) ) {
$css_info = get_post_meta( $reusable_block, 'gutentor_css_info', true );
wp_enqueue_style( 'gutentor-dynamic-' . $reusable_block, trailingslashit( $upload_dir['baseurl'] ) . 'gutentor/p-' . $reusable_block . '.css', false, isset( $css_info['saved_version'] ) ? $css_info['saved_version'] : '' );
}
}
}
Please don’t forget to backup the file and let me know if the issue goes after replacing the code.
Best Regards!
Thread Starter
Aaron
(@jstask)
This fixed it! Do you include this in your next update?
Hello @jstask ,
We have added it to the recent update. Thanks for letting us know about it.
Best Regards!