Tagged: #quickcss, object cache, redis
-
AuthorPosts
-
October 29, 2021 at 9:32 am #1326948
Good Morning,
once again a very nasty one :-) Happy for any input on how to deeper debug and solve this one.
The Setup:
We run the Enfold 4.8.6.5 on WordPress 5.8.1. Multisite. We have Object Caching up and running using Pantheons WP-Redis.
We have the issue, that the QuickCSS does not get correctly merged into the avia-merged-styles-…—….css file.Our debugging shows the following facts:
– Saving QuickCSS correctly renders the content into the /wp-content/uploads/sites/…/dynamic_avia/enfold.css file
– This also triggers the generation of a new avia-merged-styles file
– Yet only the uniqueid() part changes, the file content hash remains the same. So does the content. The new QuickCSS does not get into the merged css
– Disabling the CSS merging outputs the corrent and up to date enfold.css with the updated QuickCSS
– Digging into the Object Cache we found a cache key prefix_12:options:aviaAsset_css_filecontent which does NOT get updated on saving the QuickCSS.We believe that inside the asset-manager.class.php the function get_file_data might have some issues recognizing the changed enfold.css. Or to be more precise: To correctly handle updates of the option and a possible object cache. At least that’s the code part where the aviaAsset_css_filecontent option is conditionallywritten / updated.
After we delete the key from the object cache manually, the change is propagated correctly from the QuickCSS to the merged CSS file.
Anyway I am surprised, that the file key still remains the same although the content changed. Only the uniqueid changed. But I didn’t look into how you generate that key currently. I just believed it would be the hash of the file content which it obviously is not (anymore?).Notable: Up until now (5-10 Minutes after deleting the object cache key) the cache key was not created anew. Might this have been some kind of a relict / leftover?
As you have a better understanding of this complex part of Enfold, we are very happy for any suggestions regarding the next debug steps.
Thanks and best regards,
JanOctober 30, 2021 at 5:03 pm #1327076Hey Jan,
Thanks for digging into this.
First:
Did you see the option:
Theme Options -> Performance -> Show advanced options -> Unique timestamp of merged files and WP object cache bug
Try to select “Fix WP Bug …..”.
Second:
The hash value is created from the filenames that are merged and not from file content (filenames are from wp_enqueue object).
This means whenever you change a merged file content manually you have to save the theme options to invalidate the merged files.
On theme update invalidating is done by default.Hope this helps.
Best regards,
Günter -
AuthorPosts
- You must be logged in to reply to this topic.