-
AuthorPosts
-
April 26, 2019 at 1:18 pm #1094722
I added some code to my footer and it has a link to another site. It is using an external hosted image.
My CSS is as follows:
.my-link::after{ content: url(https://externalsite.com/links/image.png); top: 2px; position: relative; }
Enfold is replacing the URL to:
https://www.site.com/wp-content/uploads/dynamic_avia/externalsite.com/links/image.png
Resulting in a 404.
Why?
How to fix it?- This topic was modified 5 years, 8 months ago by peterolle.
April 28, 2019 at 3:02 pm #1095029April 29, 2019 at 7:18 am #1095175Thank you Michael, that helped, but the fix has a big problem. Hopefully @Günter or other Enfold moderator/Developer sees this.
After uploading the fixed asset-manager.class.php file, now the external URL is used, BUT it is replacing https for http, resulting in:
Mixed Content: The page at 'https://www.mysite.com/' was loaded over HTTPS, but requested an insecure image 'http://externalsite.com/links/image.png'. This content should also be served over HTTPS.
So now the site breaks completely for HTTPS.
Can anyone please share the fix?
April 30, 2019 at 2:25 am #1095556Hi,
Thanks for the update.
Did you disable or toggle the Performance > File Compression settings after the file modification? Please post the site url along with the login credentials so that we can inspect issue.
Best regards,
IsmaelApril 30, 2019 at 4:11 am #1095575If https was used since the first time, what file compression has to do anything with this?
I use https, the result is http, so the problem is in the fixed file, or maybe in another file.
I can confirm that the fixed file actually let the external URL to be used, the problem is that it is changing it to http only and that is worse.
Thanks.
May 1, 2019 at 8:59 am #1096086Hi,
Thanks for the update.
The compression should actually convert http to https, not the other way around as you can see on line 203 of the asset-manager.php file.
if(is_ssl()) $avia_upload_dir['baseurl'] = str_replace("http://", "https://", $avia_upload_dir['baseurl']);
We’ll tag this thread so that @Günter can see it and confirm. Please try to toggle the compression and let us know if it changes anything.
Best regards,
IsmaelMay 2, 2019 at 2:21 pm #1096475It is file compression, when I enable CSS file merging and compression, it fails and changes the URL to http://, if I disable CSS file merging and compression it loads correctly with https://.
So, replacing enfold\config-templatebuilder\avia-template-builder\php\asset-manager.class.php fixes the external URL problem, but now compression makes it fail with a no secure URL.
Any fix to have it working correctly?
Thanks.
- This reply was modified 5 years, 7 months ago by peterolle.
May 2, 2019 at 3:00 pm #1096490Hi,
We released a beta version that should fix this problem – see private content.
Do not forget to clear server and browser cache, disable enfold compression in theme options, save theme options and enable it again to force a rebuild of the dynamic files.
Best regards,
GünterMay 2, 2019 at 3:25 pm #1096504Thank you. I assume this will come out soon and with other fixes, so I rather wait for the official update to update all my sites.
Glad to know this is fixed in the next version.
Cheers.
May 2, 2019 at 3:33 pm #1096506 -
AuthorPosts
- You must be logged in to reply to this topic.