Viewing 22 posts - 1 through 22 (of 22 total)
  • Author
    Posts
  • #989192

    hello Kriesi,
    on my site, in enfold child theme administration, i went to performance tab and enabled both compression of the css and js. And choose load only used elements.
    Nothing of these settings work. I deleted cache, reset nginx settings. Nothing work.
    The compressed files are created correctly in dynamic_avia folder but the theme doesn’t use them… could you help me, please?

    • This topic was modified 6 years, 4 months ago by paolots.
    #989537

    Hey Paolo,

    Thank you for using Enfold.

    I am on another thread with exactly the same issue but I’m not sure why it’s not using the merged file. Have you tried to remove the “dynamic_avia” folder manually before? Where is the site hosted?

    Best regards,
    Ismael

    #989548

    hey Ismael, thank you for your reply.
    i have tried to remove the dynamic_avia folder before compression, during and after compression and it was regenerated correctly, and the merged files also was.
    the server is a vps that i personally configure with: debian 9.4, php 7.2.7, nginx 1.15.0, mariadb 10.1.26
    i can help you, but for me the question is: where enfold told wordpress to use the compressed and merged files instead of the normal? And when i check Load Only Used Elements, why there are some elements that are loaded anyway (ex: google maps, that i don’t use in any part of the site)? is there a way to remove completely google maps from the child-theme?
    I have this following code in my child functions.php, but it seems that it isn’t enough…
    function avf_gmap_vars_disable($map) {
    if(!is_admin()) {
    $map = null;
    }
    return $map;
    }

    add_filter(‘avf_load_google_map_api_prohibited’, ‘avf_load_google_map_api_prohibited_true’, 10, 1);
    function avf_load_google_map_api_prohibited_true($prohibited) {
    if( is_admin() ) $prohibited = true;
    return $prohibited;
    }

    add_action(‘wp_enqueue_scripts’, ‘ava_deregister_gmaps’, 9999);
    function ava_deregister_gmaps() {
    if(is_admin()) {
    wp_deregister_script( ‘avia-google-maps-api’ );
    wp_deregister_script( ‘avia_google_maps_front’ );
    wp_deregister_script( ‘avia_google_maps_front_script’ );
    wp_deregister_script( ‘avia_google_maps_api_script’ );
    wp_deregister_script( ‘avia_google_maps_widget_admin_script’ );
    }
    }
    Thank you

    • This reply was modified 6 years, 4 months ago by paolots.
    #989589

    Hey Ismael,
    are there any good news about that issue?

    #990073

    Hi,

    i can help you, but for me the question is: where enfold told wordpress to use the compressed and merged files instead of the normal?

    It’s in the config-templatebuilder > avia-template-builder > asset-manager.class.php > “try_minifying_scripts” function. It fails to generate the merged file. You can use the Autoptimize or the BWP Minify plugins temporarily while we debug the issue.

    In the database > _options table, please search for and delete the “aviaAsset_avia-merged-styles” and “aviaAsset_avia-head-scripts” entries. Toggle the theme options again to regenerate the merged scripts and stylesheets. Let us know if it helps.

    Best regards,
    Ismael

    #999703

    Hey Ismael,
    one month has passed and i would like to know if you have investigated. Are there any good news about that issue?
    Let me know, please.

    #999706

    As i wrote, all the errors still persists.
    In the db i see:
    aviaAsset_avia-merged-styles –> a:1:{s:51:”avia-merged-styles-ebf4dbc4ee7d2150f1b06bbeb9326870″;s:21:”error-generating-file”;}
    aviaAsset_avia-head-scripts –> a:1:{s:50:”avia-head-scripts-54b9e591b8e206c5470da6c19cb248a4″;s:21:”error-generating-file”;}
    aviaAsset_avia-footer-scripts –> a:3:{s:52:”avia-footer-scripts-5d4a752d6fb9ff8d6b9eb6c58ab06252″;s:21:”error-generating-file”;s:52:”avia-footer-scripts-107445883e2262d12295d8b6bb0c5ab4″;s:21:”error-generating-file”;s:52:”avia-footer-scripts-54b9e591b8e206c5470da6c19cb248a4″;s:21:”error-generating-file”;}

    There are some particular server specifications for the theme that i have to set with php or mysql for example?
    My server is a debian 9.4 vps with
    PHP 7.2.8-1+0~20180725124257.2+stretch~1.gbp571e56
    nginx/1.15.2 built by gcc 6.3.0 20170516 (Debian 6.3.0-18+deb9u1) built with OpenSSL 1.1.0f 25 May 2017 TLS SNI support enabled
    mysql Ver 15.1 Distrib 10.1.26-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2
    Let me know how can i help you if you want more informations about that.
    Thank you
    Paolo

    #1000167

    can you help please?

    #1001057

    Hi,

    Sorry for the delay, your server configuration looks good to me. Have you checked if the theme has proper folder permission? Please check the link in private.

    Great pictures! but it’s recommended to use only 5 to 6 images in the slider to keep the page light. You can add more images to the gallery section.

    Best regards,
    Vinay

    #1001268

    Hi Vinay,
    thank you very much for the compliments.

    i made a chmod to all the site with 755 for the folders and 644 to all the files.
    Nothing changes.
    In the db all the aviaAsset_****** gives an s21:”error-generating-file”
    in the dynamic_avia folder in wp-content/uploads i can see two avia-footer-scripts-[hash].js, one avia-merged-styles-[hash].css, one enfold_child.css and one index.php
    so none avia-head-scripts-[hash].js was generated…
    how could you resolve that issue?

    #1002114

    Hi,

    I’m pretty sure this is server related but I don’t know which configuration is missing. I’ll ask @Gunter to check the thread. Please wait for his response.

    Best regards,
    Ismael

    #1005479

    hi,
    no response until now. And one month is passed. No word.
    Is there anyone in kriesi able to solve my problem?
    Thank you

    #1005598

    Hi,
    I temporarily fixed it by replacing line 137 in enfold/config-templatebuilder/avia-template-builder/php/asset-manager.class.php

    
    if($generated_files[$data['hash']] && $generated_files[$data['hash']] !== "error-generating-file")
    
    

    with

    
    if($generated_files[$data['hash']])
    

    The detection if a file was generated successfully or not does not work properly on your server. We’ll look into it. If we can’t find a solution for your server we’ll probably add a filter to the detection function which enables you to bypass the detection. The file generation works flawlessly and the merged/compressed files are in the right folder and valid.

    Best regards,
    Dude

    #1005649

    Hi Dude,
    now in the frontend source code i can see the merged and compressed files, but wp-content/uploads/dynamic_avia/avia-head-scripts-54b9e591b8e206c5470da6c19cb248a4.js is not generated neither saved in dynamic_avia folder…
    I think something is wrong
    Thanks

    #1006170

    Hi,

    I checked your site by creating a testpage and adding some php code which I removed again.

    The problem is, that the files are probably generated (cannot check this because no ftp access) but cannot be read by WP (see screenshot in private content):

    Error 52: Empty reply from server.

    We check if we can read the file after creating it – if not we assume that an error occured creating the file and ignore the compression settings.

    Best regards,
    Günter

    #1006175

    hi,
    in dynamic_avia folder there are the merged css, footer but not header, so …
    (see screenshot in private content)

    #1006181

    Hi,

    but WP cannot read the files after creating them (header file missing is no problem, because there are no header scripts needed) – no idea why your server has a problem reading the files right after creating them. On other servers this is no problem.

    Best regards,
    Günter

    #1006186

    Excuse me,
    but i don’t understand why…. in the db i still see error generating files (see img in private) and in the frontend wp load all elements, everything but what i specify in performance…
    it seems to me the theme compression and merging functions generates a lot of errors…

    #1006505

    Hi,

    Yes, the theme compression and merging functions do not work on your server. The files are generated but WordPress returns an error when it tries to read the files. Unfortunately we’re not able to solve this issue on your server, also Günter couldn’t find any reasons why wordpress doesn’t read the files properly.

    I installed bwp minify and configured it for you now. It does the same like our compressing/merging script but offers some advanced features (you can select which files should be merged, etc.). I added a link to the option page into the private content field.

    Best regards,
    Dude

    #1328360

    Old thread but came up when I encountered a similar problem.
    When using a host with a staging or dev environment like WpEngine, Siteground or Flywheel etc. or any server where a .htaccess password has been set.
    Enfolds script merge function cannot verify the creation of the merged files and produces an error code 21 in the database merge fields.

    The function should run correctly in live anyway
    To resolve in staging environments – I assume for testing purposes – Remove the password temporarily and then turn script merging off and on again in the Enfold performance control panel and click save.
    This will allow the process to verify the creation of the files and serve a merged script.
    Live push – I would recommend disabling script merge and re-enabling it after going live because the process will need to run again in live anyway.
    Hope this helps others.

    • This reply was modified 3 years ago by thinkjarvis. Reason: spelling mistake
    #1328422

    Hi thinkjarvis,

    Thanks a lot for sharing, it’s much appreciated. We added your post to our documentation: https://kriesi.at/documentation/enfold/optimization/#performance-compression-is-not-working

    Best regards,
    Rikard

    #1328458

    on a customer installation – the hoster updated to Debian Bullseye (I guess it’s version 11), this version implemented only Apache 2.4 modules.
    This caused some problems with various plugins. In the older theme was yes debian 9.x at the start, but maybe thinkjarvis problems stem exactly from that. Ask your provider if they also run Bullseye in the meantime.

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