Viewing 10 posts - 1 through 10 (of 10 total)
  • Author
    Posts
  • #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.
    #1095029

    Hi peterolle

    This post might help you.

    Best
    Michael

    #1095175

    Thank 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?

    #1095556

    Hi,

    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,
    Ismael

    #1095575

    If 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.

    #1096086

    Hi,

    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,
    Ismael

    #1096475

    It 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.
    #1096490

    Hi,

    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ünter

    #1096504

    Thank 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.

    #1096506

    Hi,

    Thanks for your feedback.

    If you could test it on a staging site and let us know that the problem is really fixed would be a great help.

    Thank you for assisting.

    Best regards,
    Günter

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