Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • #1006974

    Hi Team,

    this bug is known at least 4.3 but still not fixed?!
    When CSS file merging is aktive, css background images have all wrong url like this:
    css: background: #fff url(‘/wp-content/themes/treff7/img/motiv_home.jpg’) center center;
    console with CSS file merging: https://www.xxx.de/wp-content/themes/treff7/wp-content/themes/treff7/img/motiv_home.jpg

    Is there an fix or workaround?
    (Victoria: I have read the other threads and the old Link from Ismael don’t work no more and the latest solution
    was to disable CSS file merging.)

    Thank you and reagrds
    Mike

    • This topic was modified 6 years, 2 months ago by Mike61.
    #1007411

    Hey Mike61,
    For version 4.3 this was the patch from the dev team, but this was merged into the v4.4 release, are you still using v4.3 or have you updated to v4.4.1?

    If this doesn’t help, please include a admin login and ftp access in the private content area and a link to the element in question so we can take a closer look.

    Best regards,
    Mike

    #1007413

    Hi Mike,

    yes I am using 4.4.1 “Your current Parent Theme (Enfold) Version Number is 4.4.1”
    There is no “Element” to were I can Link, the Element is .home .header_bg.
    See privta Data…

    Best Regards
    Mike

    • This reply was modified 6 years, 2 months ago by Mike61.
    #1007450

    Hi,
    Thank you for the login, I checked your site and enabled css merging and saw the issue you described, I then tried setting a absolute file path in your css and re-saved your theme settings to rebuild the merged files and now the issue is resolved.
    Please clear your browser cache and check.

    Best regards,
    Mike

    #1007625

    Hi Mike,

    I know that an absolut path fix this problem but this is not the solution!
    Using absoliut path css is bad practice a I hope the enfold team will find
    an real solution?!

    Best Regards
    Mike

    #1008465

    Hi,

    Thank you for reporting this. I opened an issue in our dev repository and will have a look into it asap.

    I will come back to you when I found a solution.

    Best regards,
    Günter

    #1008854

    Hi,

    Using relative paths you have to “navigate” from the location of the file with the code to the location of the image.

    When you put the code in styles.css of the child theme this should work (tested on my dev server):

    
    background: #fff url(‘../treff7/img/motiv_home.jpg’) center center;
    

    Best regards,
    Günter

    #1008897

    Hi Günter,
    thank you for you answer!

    I know this kind of notation too but a path like this “/wp-content/themes/treff7/img/motiv_home.jpg”
    works on all server and is normally best practice. My question is still: Why this don’t work with CSS file merging of Enfold
    and when you will fix this Bug? Please understand, I don’t need an workaround, I want a fix for this bug!

    Best Regards
    Mike

    #1008948

    Hi,

    To fix this issue please open up enfold/config-templatebuilder/avia-template-builder/php/asset-manager.class.php and replace line 500:

    
    if( ( false !== stripos( $match[1], 'http://' ) ) || ( false !== stripos( $match[1], 'https://' ) ) || ( false !== stripos( $match[0], $base_url ) ) )
    

    with

    
    if( ( false !== stripos( $match[1], 'http://' ) ) || ( false !== stripos( $match[1], 'https://' ) ) || ( false !== stripos( $match[0], $base_url ) ) || ( false !== stripos( $match[0], '/wp-content/' ) ) )
    

    Best regards,
    Dude

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