-
AuthorPosts
-
September 7, 2018 at 9:29 am #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.jpgIs 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.
September 8, 2018 at 1:26 pm #1007411Hey 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,
MikeSeptember 8, 2018 at 1:34 pm #1007413Hi 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.
September 8, 2018 at 5:39 pm #1007450Hi,
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,
MikeSeptember 9, 2018 at 4:40 pm #1007625Hi 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
MikeSeptember 11, 2018 at 5:25 pm #1008465Hi,
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ünterSeptember 12, 2018 at 11:24 am #1008854Hi,
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ünterSeptember 12, 2018 at 1:25 pm #1008897Hi 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
MikeSeptember 12, 2018 at 2:46 pm #1008948Hi,
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 -
AuthorPosts
- You must be logged in to reply to this topic.