Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #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,
    Jan

    #1327076

    Hey 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

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.