Tagged: 

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #1192299

    I would like to report a strange problem.

    Several days ago I made the update of Enfold, from the WordPress dashboard.
    Today the hosting contact me to tell me that the disk space of my site is full, the cause is an error-log file of several GB in which this error appears repeatedly:
    PHP Warning: file_get_contents (/home/morvandrive/public_html/https://www.morvandrive.fr/wp-content/uploads/dynamic_avia/sn-2018.css): failed to open stream: No such file or directory in / home /morvandrive/public_html/wp-content/themes/enfold/config-templatebuilder/avia-template-builder/php/asset-manager.class.php on line 442

    I then made a new manual installation of Enfold, downloading the file from Themeforest, uploading the file via FTP, and now the error seems to be resolved.

    What do you think? Was it possible that the cause of the error was updating the theme from the WordPress dashboard?

    Best regards
    Oriano

    #1192305

    Hey Oriano,

    Thanks for contacting us :)

    This seems to be the issue on your server as well – https://kriesi.at/support/topic/dynamic_avia-making-way-too-many-calls/#post-1182734. Could you please try adding following code to bottom of Functions.php file of your child theme in Appearance > Editor

    function my_custom_merged_files_unique_id( $uniqid, $file_type, $data, $enqueued, $file_group_name, $conditions )
    {
    return 'my_stamp';
    }
    add_filter( 'avf_merged_files_unique_id', 'my_custom_merged_files_unique_id', 10, 6 );

    After adding the code, please go to Enfold theme options > Performance and check “Delete old CSS and JS files” at the very bottom and save changes. After applying the changes, please check with your hosting provider to confirm :)

    Cheers!
    Yigit

    #1192328

    Hi Yigit
    thanks for your answer,
    and sorry for the confusion I made this morning in the search for the support form (these are difficult days caused by the Coronavirus emergency …).

    I entered the code and reported the correction to the hosting, which confirms the return to normal, and the disappearance of the php warning error.

    But will these lines of code that I inserted in the function.php file of the child theme always remain?
    or will I have to delete them at the next Enfond update?

    Best regards
    Oriano

    #1192359

    Hi Oriano,

    No worries at all, we are here to help :)

    Glad it is back to normal!

    You have enabled file merging and compression in Enfold theme options > Performance. However it seems that your server is caching WP database options and returning that cache instead of the last updated values.
    As we save the generated filenames in WP database options Enfold gets the wrong info that the merged files do not exist and therefore creates new ones on every pageload.
    By adding the code, you are replacing timestamp with “my_stamp” which stops creation of new merged files on page load.

    You can either keep the code in functions.php file of your child theme or disable file merging and compression in Enfold theme options > Performance and use a plugin such as Autoptimize instead.

    Best regards,
    Yigit

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