Viewing 26 posts - 1 through 26 (of 26 total)
  • Author
    Posts
  • #1181000

    What is this and why is it calling so often?

    #1181954

    Hey Illingco,

    Thank you for the inquiry.

    They are the merged scripts and stylesheets. Looks like the server or its configuration is denying access to these files. Unfortunately, we are not sure what’s causing it. Temporarily, you can disable the Performance > File Compression settings to get rid of the issue. If you need to minify the scripts and stylesheets, try to use Autoptimize or BWP Minify instead.

    Best regards,
    Ismael

    #1182159

    Your answer is to disable part of your theme’s functionality and use someone else’s?? That does not instill much confidence in your theme. Seems like some error in how Enfold is merging those scripts with the most recent version. I wonder what happens if Enfold is rolled back.

    #1182167

    This is what is in one file. Is there something wrong in here??

    #1182734

    Hi,

    A few releases ago we added a unique timestamp to the merged filename because when updating the content of a CSS or js file or of Custom CSS option without changing theme version the generated hash for the filename remained unchanged and browsers did not recognize to reload the file but used the cached version instead until this cache expires – means the changes are not visible to visitors.

    The problem you have is server related. 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.

    For the next version (4.7.2.1 or later) I added a filter where you can remove the timestamp.

    This means that each created file has the same filename and overwrites the already existing one until your server returns the correct DB value that the file exists and Enfold can stop creating new files.

    To functions.php of your child theme add the following (https://github.com/KriesiMedia/enfold-library/blob/master/actions%20and%20filters/Performance/avf_merged_files_unique_id.php):

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

    Best regards,
    Günter

    #1183414

    This doesn’t work at all. Sorry!

    #1183459

    Hi,

    Did you update to 4.7.3 and clear server cache?

    Best regards,
    Günter

    #1183467

    Hey, everything is automatically up-to-date and server cache is cleared almost everyday in every week.

    #1183529

    Hi,
    @dorisa Günter asked me to check your installed files via FTP, so I replied to your other post because it was your and you can add info in the Private Content area there, this post is not yours so it’s not private.
    Lets please continue there.

    Best regards,
    Mike

    #1183622

    I updated to 4.7.3. Do i still need this PHP code, or does the update take care of it?

    #1183626

    And upon updating the test site, I now get a new error: An error of type E_COMPILE_ERROR was caused in line 177 of the file /home/website/staging/wp-content/themes/enfold/framework/php/inc-autoconfig.php. Error message: require(): Failed opening required ‘/home/website/staging/wp-content/themes/enfold/framework/php/avia_shortcodes/shortcodes.php’ (include_path=’.:/usr/local/php71/pear’).

    Cmon people…

    #1183627

    It doesn’t matter that you updated, you cleared your cache or anything else. The dynamic-avia is never stopping making calls and rewriting scripts over and over again. I even put this PHP code and it does nothing.

    #1183708

    Hi,
    @illingco if you do not want the theme to use a timestamp with the file merging and compression then you would continue to use this filter. I have tested it on my install and the filter works correctly, for example I replaced the timestamp with “my_stamp” using the filter like this:

    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 );

    and this is the results:
    2020-02-11-172151
    So the steps I took were to add the above filter then go to Performance > File Compression and enable “Delete old CSS and JS files” at the bottom of the page, enable css & js file merging and compression, and “save all changes”, then go to the front page and reload.
    If css & js file merging and compression was already enabled, then go to the Quick CSS and add a blank space to make the “save all changes” clickable and change the css in the theme to force a new file to be created when the front page is reloaded.
    Another example of the filter being used, I saved a copy of the merged files and forced the theme to create a new file, in the screenshot notice the time of the file, these files have the same name and would have overwritten each other because there is no timestamp.
    2020-02-11-174411

    As for your update error, this looks like you tried to overwrite the theme folder instead of deleting it and creating a new theme folder. Is this correct?

    Best regards,
    Mike

    #1183914

    Hi guys. So if you exactly do, but really exactly, then Mike’s method works, at least it seems like it’s working pretty well until now while we didn’t detect any continuous calling or overwriting issue on dynamic-avia. So far, this is the only reliable solution that provides result, and yes just adding the filter won’t do the work. You must do exactly and apply how Mike described. Good luck to you all and thank you Mike, you nailed it!

    #1183936

    For the update error, no I did not overwrite. I never do. I rename the existing Enfold folder to Enfold_old, then copy the new Enfold folder over, test, and delete Enfold_old.

    Circling back to the filter, do I just copy and paste your PHP into a snippet (don’t have a child theme)? Any changes necessary? Also, not sure what you mean when you say “If css & js file merging and compression was already enabled, then go to the Quick CSS and add a blank space to make the “save all changes” clickable and change the css in the theme to force a new file to be created when the front page is reloaded.” I get the blank space to force the save button to activate, but the part about changing the css in the theme to force a new file to be created is a bit confusing. What css am I changing to force the file to be created? Or do you just mean adding that blank space? Thanks, hopefully a more elegant, hands-off solution will be written into the next release…

    #1183944

    Also got this when updating the live site. Enfold seems to have more issues lately…

    An error of type E_COMPILE_ERROR was caused in line 51 of the file /home/website/public_html/wp-content/themes/enfold/functions.php. Error message: require_once(): Failed opening required ‘config-layerslider/config.php’ (include_path=’.:/usr/local/php71/pear’)

    #1183963

    For those of us monitoring this thread who are concerned about our own sites… Gunter et al, is this impacting all Enfold installations or only the ones where performance settings are turned on? So far I have not received an email from my hosting provider but want to make sure that does not happen.

    Thanks!

    #1184113

    Hi,
    @illingco, what I meant was that adding a blank space into the Quick CSS changes the css by one blank space, thus the theme writes a new file. You can copy the function into your theme’s functions.php, as I posted it.
    If you don’t feel comfortable doing this, please include an admin login and FTP access in the Private Content area and we could assist.

    @goldengate415, this seems to occur on some servers, we have not been able to recreate.

    Best regards,
    Mike

    #1184212

    I prefer to use a snippet if possible, since functions.php will be overwritten on every update. Is that feasible? Can i just do that, add the space to quick css, save, and be good to go?

    #1184466

    Hi,
    I recommend using a child theme, Read about using a Child Theme

    Best regards,
    Mike

    #1184550

    So for many who don’t have child themes and can’t do that, then what? Seems to me fixing this at it’s core would be priority #1, not making your users jump through hoops to accommodate code discrepancies that aren’t being addressed. Not to mention needing to totally reconfigure the child theme to match what we already have customized in the main theme…

    #1184618

    Hi,
    A child theme is recommended by WordPress and Enfold, and it is included with Enfold

    Best regards,
    Mike

    #1184626

    Great. Doesn’t answer my question. Why can’t I just put it into a snippet and be done? A child theme at this point means reconfiguring all my theme customization settings. On a live site no less.

    #1184629

    Hi,
    If you add a snippet to your parent theme functions.php then it will be lost on your next update, that holds true for any file you edit.
    You could use a plugin like: My Custom Functions

    Best regards,
    Mike

    #1187773

    I have added your filter exactly as you sent it (my_stamp) to a staging site to test, using Snippets (I believe it’s nearly identical to My Custom Functions when used to insert custom PHP to functions.php). Is that correct?

    #1188383

    Hi,

    Yes, that should work fine. Please delete the cache and try to enable the File Compression settings again. Let us know if the site still generates multiple copies of the merged files.

    Thank you for your patience.

    Best regards,
    Ismael

Viewing 26 posts - 1 through 26 (of 26 total)

You must be logged in to reply to this topic.