YOOtheme Pro is here! The best WordPress and Joomla theme. Learn more

Avatar erik Yootheme asked

Image Bug in Joomla 3.8

Note: The image srcset bug is fixed in Joomla 3.8.1. It is save to update YOOtheme Pro now


Due to a bug in Joomla 3.8.0 with the srcset attribute, we advise our YOOtheme Pro subscribers not to update to Joomla 3.8 till these issues are resolved.

This Joomla bug breaks all images which are optimized for different devices using the srcset attribute. This means all images in YOOtheme Pro where the image width or height options are set, won't display anymore. This bug only appears in Chrome and mobile devices.

Together with Ryan Demmer, we already proposed a fix for Joomla on Github to solve the issue. Please help testing the fix, so it can be merged asap. Hopefully it will be included in Joomla 3.8.1.

Fix Joomla manually

  1. Open \joomla\plugins\system\sef\sef.php and
  2. Scroll to row 143
  3. The following line of code

$data[] = preg_replace('#(?!/|' . $protocols . '|\#|\')([^\s]+)\s+(.*)#', $base . '$1 $2', $url);

should be replaced with

$data[] = preg_replace('#^(?!/|' . $protocols . '|\#|\')([^\s]+)\s+(.*)#', $base . '$1 $2', $url);

This should fix the issue.


Also make sure you are using YOOtheme Pro 1.9.7. This version fixes an issue with the module positions renderer in Joomla 3.8 and YOOtheme Pro.

Please let us know if you run into any additional issues regarding the Joomla 3.8 and YOOtheme Pro 1.9.7 in this thread. We will keep you up to date. Thanks for your patience.


Update

The image srcset bug is fixed in Joomla 3.8.1. It is save to update YOOtheme Pro now

  • YOOtheme Pro

Edited

43 Answers

4

Avatar erik Yootheme answered

Hi vladimir.eliseev,

unfortunately the problems are not only up to us to fix, for example the srcset breaks because of an issue in Joomla itself, not in YOOtheme Pro, as you can see here:

https://github.com/joomla/joomla-cms/pull/17978

We are doing our best to resolve these problems as fast as possible / to create a workaround till this issue is fixed in Joomla.

Cheers,
Erik

Edited

3

Avatar michele.jordan answered

Installed 3.8 in dev, clearly broken. Applied manual fix, no fix.
Installed 3.8.1 in dev, still broken.

I'm going to make a new copy of dev, and try again...

Update:

I made a new copy of the production site into development, and did only the Joomla 3.8.1 upgrade, leaving the Yootheme Pro template at v1.9.4.

This works, and looks right. I'm now off to update to template 1.9.9, with the additional "I just opened the layout > site in the Builder and toggled from Full width to Boxed, then back to Full width again and saved." from ana.robinson and see how it looks...

Update 2:
Template upgrade to 1.9.9 looked wrong, but ana.robinson's suggestion of Box back to Full width fixed it, apparently. So Kudos to her, but we shouldn't have to be flipping bits back and forth during a template upgrade.

Edited

2

Avatar vladimir.eliseev answered

You told that yootheme pro have problems with Joomla 3.8 RC.
Why don't you fix this problems in advance?
You answer that it will be fixed than Joomla 3.8 released...

So what now?

Edited

2

Avatar brian.peat answered

I think there's still an issue with Widgetkit sliders not having a height though. My site is still a big mess after fixing the sef file.

Update: might have been a cache issue, but it fixed itself for me now.

Edited

2

Avatar renata.gravendijk Online answered

Hello

I didn't know this. I updated Joomla as usual. No problems as i have no fixed images in use.

BUT: i just updated to the latest Pro and suddenly my website is not centered but lined to the left.
https://www.gemeenteraadsverkiezingenhoorn.nl/

Is this a result of trying to fix the above problem? Pls advise?

f.y.i. you have email adresses of all your customers, why didn't you sent a warning email?

Kind regards
Renata

2

Avatar anna.robinson answered

Flusen,

This left alignment happened to all my sites with YOOtheme Pro 1.9.9 update as well. I just opened the layout > site in the Builder and toggled from Full width to Boxed, then back to Full width again and saved. This solved it for me.

Best
Anna

1

Avatar erik Yootheme answered

Hi matthew.meehan.55,

sorry, our inline-code markup here in the forum somehow added false hashes to the code. It is correct now in the top post. The only change is a tiny ^ in there.

Thanks for the heads-up!
Cheers,
Erik

Edited

1

Avatar massimiliano.romoli.69 answered

Hi matthew
maybe i can help you

I added a ^ as you can see below

$data[] = preg_replace('#^(?!/|' . $protocols . '|#|\')([^\s]+)\s+(.*)#', $base . '$1 $2', $url);

my site now works fine

Bye

1

Avatar bertpohl answered

Now that Joomla 3.8.1 is out, I would also love to know if this release fixes the bug... (?)

1

Avatar gws154 answered

Joomla 3.8.1 resolves this issue. This was released 1 day ago and this issue is patched

Leo Lammerink
MD GWS-Desk.com
Member Joomla CMS Release Team

0

Avatar andre.schmitz answered

Hi where can i get the fix? Where can i download it?

0

Avatar erik Yootheme answered

Hi andre.schmitz,

you can update YOOtheme Pro just like you are used to for the "top and bottom position with builder module not showing" fix. For the "image link fix" you would have to manually apply the change described in the top post. Joomla has not released a new version with this fix yet. We will keep you updated.

Cheers,
Erik

Edited

0

Avatar andre.schmitz answered

hi @ all i have only install the morgan theme again and not it works fine with 1.9.7

0

Avatar matthew.meehan.55 answered

I haven't been able to find that line in the set.php file Erik.

Line 143 in my file looks like:

$data[] = preg_replace('#(?!/|' . $protocols . '|\#|\')([^\s]+)\s+(.*)#', $base . '$1 $2', $url);  

If this is the line I change, what do I change it to?

Thanks

0

Avatar oliver.lipp answered

It is not working for my bug .... !!

The frontpage is not working fine. No Featrued Articel is shown ..!!

I cannot change the Template on the Frontpage ..

All other sites are working but the Frontpage doesn´t ...

0

Avatar john.vincent answered

my logo is not showing in FF but it shows out of place in Chrome

I am on 3.8 because the only place I can find out about the bug is on this forum.

What am I supposed to do ? Your fix does not work

0

Avatar umut.korpe.47 answered

Hello there,
My site: https://www.rekorsanat.com.tr/
https://www.fulmaks.com/
https is running
Theme name: Joy
The Joomla 3.8 bendede widget did not work with resize pictures.
I changed the code you gave. But it did not work.
I have restored the Joomla 3.7.5 for the solution.
We look forward to hearing from you.
Thank you.

Edited

0

Avatar krisztina.csapo answered

I successfully updated 5 YoothemePro sites with the workaround, all seem to be OK. Also upgraded 2 sites with Lykka - they work fine. I also have a site with Monday template, so I would be glad to have an answer to @laurent.denizet's problem. Thanks

0

Avatar giulio.maria.cappellano answered

is not better that you make an override in your code instead of modifying joomla core code?

0

Avatar martinahovi answered

Thanks a lot, this post saved me! Site was already online!

0

Avatar erik Yootheme answered

Hi krisztina.csapo, brian.peat, john.vincent, cappu, oliver.lipp, laurent.denizet, smarsden and umut.korpe.47!

Please create your own Questions for the problems you are describing. We need more detailed information to look into them. And please add a link to your site and admin credentials (super user) in the hidden information section.

To add hidden information, just click Edit at the bottom right of your initial question (= the first post in this thread) and then use Add hidden information at the bottom left to provide the required access data.

This information will only be visible to the YOOtheme support team.

Before you post the credentials please try them yourself to log in to make sure they work or a new account you might have created was activated.

Please also make a full backup before you grant access to your site by giving these details!

Cheers,
Erik

Edited

0

Avatar tom.m.albers answered

Hi there,

has this problem been solved yet? I have a client site which I can't update, cause I am not willing to change the core of joomla for this. In my view it needs to be solved in the YOOtheme Pro template. Could you shed any light on the roadmap/prognosis?

Thank you very much, regards, Marijke

0

Avatar vale answered

Problem is fixed after upgrading to Joomla 3.8.1 in my chase.

Edited

0

Avatar tom.m.albers answered

Thank you Anna, you are right, it should firstly be fixed in Joomla and then in subsequent extensions, start at the source. Let's hope the Joomla update containing the fix comes swiftly.
Have a lovely weekend...

0

Avatar eric.paap.13 answered

Hello
I have fixed that line in sef.php in Joomla 3.8.0 and uploaded Pro 1.9.9 but I have problems with the menu. At the homepage i can see it but at the other pages not anymore. When I go with the mouse I find the clicks but nothing to see.

Home: http://janvermeer.nl/

Other pages like this http://janvermeer.nl/fotoreizen

0

Avatar chris.gilroy answered

Renata, The above fix works. I had a site that aligned-left as well, but cleared cache and turned off compression, updated my yootheme pro and everything was fine.

0

Avatar flusen answered

after updating the yootheme 3.X (with controlpanel - not manually) my hole site's content is no more centered as before! Everything is aligned left! Also the footer menu disappeared!

@chris.gilroy "cleared cache and turned off compression" is not helping here for that issue.

The images are showing after the patch in sef.php
$data[] = preg_replace('#^(?!/|' . $protocols . '|#|\')([^\s]+)\s+(.*)#', $base . '$1 $2', $url);

What to do now?!!!!

Edited

0

Avatar flusen answered

thank you anna.robinson - this worked for me too!

0

Avatar andrea.masnaga.andrea answered

Not knowing I installed version 3.8

I did the instructions
1. Open \joomla\plugins\system\sef\sef.php and
2. Scroll to row 143
3. The following line of code

But nothing works, what can I do?
http://www.foodemotion.org/

0

Avatar ray.lawlor answered

Thank you Leo. I've tweeted this out.

0

Avatar zoltan.nagy answered

I had the above mentioned problem with Joomla 3.8. After I overwrited the above given code line the site started to behave OK. I also had a little problem with the centering of the whole site layout after this. The following solved that problem for me: I opened the sitebuilder from extensions -> Templates -> Styles -> Yootheme and in the Layout section I changed the Full width to Boxed Page. Then saved it then I set it back to Full width and saved it again. The site still looked un-centered but few minutes later it was automatically fixed (probably I reloaded the site not from my browser chache).

Now, I am just wondering if I should click to update to 3.8.1 :) Anybody?

Edited

0

Avatar gonnie.nikamp answered

Hello Zoltan.nagy

I had the same problem as you had.. but after i did the update for 3.8.1.
After saving the changes (as you mentioned) everyting workes fine.
So I think you can update now.

-2

Avatar corinne.meister answered

Yootheme, i have the same Problem like zoltan, but nothing helps.

Changes in the Builder, clean cache, nothing.

What is our solution for this Bug?

Know someone who can answer? Share a link to this question via email or twitter.