Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1118482

    Dear Support Team,

    first I would like to thank you for your great product, I am very satisfied with the enfold theme.

    Nevertheless I have to give feedback on a problematic situation / missing feature.

    System:

    – Browser FF 68 on Win 10
    – WP 5.1
    – Enfold Child Theme 4.5.4

    Steps to Reproduce:

    1. Enable CSS minification and compression (CSS-Datei-Zusammenführung und -Komprimierung) in performance settings
    2. Call any Frontend Page
    3. Inspect merged styles URL which is /uploads/dynamic_avia/avia-merged-styles-f8bde59cd070bb823885cbbda4d43f93.css
    4. Disable CSS minification and compression
    5. Make changes in my enfold-child/style.css
    6. Enable CSS minification and compression
    7. Inspect merged styles URL which is still /uploads/dynamic_avia/avia-merged-styles-f8bde59cd070bb823885cbbda4d43f93.css

    The problem is:

    – The hash of the merged styles stays unchanged which causes browser cache issues for the website visitors, they will not see the new css styles unless the browser cache expires

    Feature Request:

    – Change the merged styles CSS hash whenever the styles have been changed. That gives developers the possibility to circumvent the end users browser cache. Or add a feature to append somekind of timestamp / custom version number.

    Thanks a lot Philipp

    #1118581

    Hey philipp1979,

    Please post us your login credentials (in the “private data” field), so we can take a look at your backend.

    1. Install and activate ” Temporary Login Without Password “.
    2. Go to ” Users > Temporary Logins ” on the left-side menu.
    3. Click ” Create New “.
    4. Add the email address for the account ( you can use (Email address hidden if logged out) ), as well as the ” Role ” making that the highest possible and the expiry about four days
      ( do be sure that we have enough time to debug ).
    5. Click ” Submit “.
    6. You’ll now have a temporary account. Please provide us here in the private section the URL, so we can login and help you out.

    When your issue is fixed, you can always remove the plugin!
    If you prefer to not use the plugin, you can manually create an admin user and post the login credentials in the “private data” field.

    Best regards,
    Basilis

    #1122451

    Thanks Basilis for your response, but i think this is not a bug, so there is no need to give you access to my website. When I have a look at your code, it seems, the hash is generated like this:

    Inside /themes/enfold/config-templatebuilder/avia-template-builder/php/asset-manager.class.php

    $data['hash'] .= $file;
    .....				
    $data['hash'] 	= $file_group_name .'-'. md5( $data['hash'] . $data['version'] );

    So the hash will always stay the same.

    Thanks

    #1122987

    Hi,

    Thank you for the update.

    We will forward this to the dev team. For now, you have to manually delete the merged stylesheet whenever you make any significant changes to the style. Or just disable the compression until you’re done with the style configuration. You can also adjust the expiry of the css stylesheets in the .htaccess file.

    Best regards,
    Ismael

    #1159093

    Hi Ismael, do you have any updates on this issue? Deleting/regenerating the merged styles is no solution as the regenerated file will have the same filename again.
    This issue means that any changes made to my custom styles on the production server will not be visible to the end user immediately. They will only see the changes after the cache expires, which is usually 1 month.
    So this is actually a very important issue which should be solved with high priority.

    Thank you

    #1159743

    Hi,

    Thank you for the update.

    For some reason, I can’t find this issue in our channel. It’s either closed or I forgot to report it. Sorry about that. I will report the issue again now. Temporarily, you can add this filter in the functions.php file to append the current time stamp in the hash string so that the file name changes every time the merged scripts and stylesheets are regenerated.

    function avf_asset_mgr_get_file_data_mod($data, $enqueued_index, $file_type, $file_group_name, $enqueued, $conditions) {
    	$data['hash'] .= time();
    	return $data;
    }
    add_filter('avf_asset_mgr_get_file_data', 'avf_asset_mgr_get_file_data_mod', 10, 6);
    

    UPDATE: We reported the issue in our channel. We’ll notify you as soon as possible.

    Best regards,
    Ismael

    #1160423

    Hi,

    Thank you for reporting this.

    Solution Ismael provided will not work.

    Please update config-templatebuilder/avia-template-builder/php/asset-manager.class.php with

    https://github.com/KriesiMedia/enfold-library/blob/master/temp_fixes/Enfold_4_6_3/asset-manager.class.php.

    The fix will add a unique timestamp to the merged files when theme options are safed.

    Will be part of the next update.

    Do not forget to clear server cache. If you need help with the update let us know.

    Best regards,
    Günter

    #1160428

    Hi, thanks for the fix. Will wait for the next Enfold Update. Best regards, Philipp

    #1160538

    Hey!

    Alright! @guenter was right. The filter above forces the theme to generate the merged files every page load. For now, you can either modify the file or wait for the next theme update. We’ll close the thread for now. Please don’t hesitate to open a new thread if you need anything else.

    Have a nice day.

    Cheers!
    Ismael

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