-
AuthorPosts
-
July 1, 2019 at 1:37 pm #1114888
Hi Team,
While debugging an issue with Merge & Combine Scripts (see https://kriesi.at/support/topic/issues-with-style-and-script-merging/#post-1114878 ) I found that aviaAsset_avia-head-scripts never gets generated and always returns an error.
My avia-head-scripts array looks like this:
Array ( [hash] => avia-head-scripts-cfa788754642173dafbd830bd7969fdb [version] => 4.5.7 [remove] => Array ( [avia-compat-js] => Array ( [name] => avia-compat [url] => https://na/wp-content/themes/enfold/js/avia-compat.js [path] => wp-content/themes/enfold/js/avia-compat.js [print] => 1 --snip--
the print=>1 trips this line, which removes it from the content generation and I get no file.
if(!$remove['print'])
Any suggestions?
July 4, 2019 at 12:27 pm #1115731Hey Jason,
Thank you for using Enfold.
The file avia-head-scripts-xxxxxx only gets generated when you enqueue scripts to the header. Enfold enqueue all the scripts that are merged in footer.
avia-compat.js is printed “hardcoded” in the head area. Therefore it is not necessary to generate the avia-head-scripts file.
If you change the last parameter of wp_enqueue_script to false (e.g. for an alb element you use) and toggle the compression you will see that avia-head-scripts file is generated.
Best regards,
GünterJuly 4, 2019 at 1:04 pm #1115746The constant error seems a little odd, but thanks for the response!
I hope the other thread gets a response though as the merge and compress is not working on my staging site due to the SSL cert.
Cheers,
JasonJuly 4, 2019 at 5:26 pm #1115845Hi,
As stated in this answer – I’m not a system administrator but could you check with your hoster / or sysadmin if there could be a problem?
We actually create the file and try to read it afterwards to make sure it is avaiable. Ignoring this as suggested in the other post could result in a broken site.
Best regards,
GünterJuly 4, 2019 at 5:27 pm #1115847Hi,
As stated in this answer – I’m not a system administrator but could you check with your hoster / or sysadmin if there could be a problem?
We actually create the file and try to read it afterwards to make sure it is avaiable. Ignoring this as suggested in the other post could result in a broken site.
Best regards,
GünterJuly 5, 2019 at 12:47 am #1115942I understand why you need to verify the compressed file is available, but your check should not mandate a signed cert; ie. you should allow self-signed certs when doing this check.
Cheers,
JasonJuly 5, 2019 at 11:31 am #1116014Hi,
In file enfold\config-templatebuilder\avia-template-builder\php\asset-manager.class.php around line 430 you find:
$request = wp_remote_get($file);
Try to replace it with:
$request = wp_remote_get( $file, array( 'sslverify' => false ) );
Hope this helps to fix the problem.
Best regards,
GünterJuly 7, 2019 at 2:40 am #1116353Yes that helps. Is there a chance you can include the fix in the next version? At least make it optional.
Cheers,
JasonJuly 8, 2019 at 3:25 am #1116534I’m having this issue as well. See https://kriesi.at/support/topic/issues-with-style-and-script-merging/#post-1116531
I proposed that they add an option switch to the theme settings that allow the user to turn off and on the SSL verification, in the case of self-signed certs.
July 8, 2019 at 3:23 pm #1116700Hey!
There will be a theme option “Http security level for checking readability of merged files” in Performace Tab in the next release.
Regards,
GünterJuly 8, 2019 at 4:39 pm #1116720When is the next release scheduled?
July 8, 2019 at 4:50 pm #1116729 -
AuthorPosts
- You must be logged in to reply to this topic.