Open czillgens opened 4 years ago
Hey @czillgens, sorry to hear you're facing issues. Could you please let me know what language you used that caused the issue?
One client complains to me also about this, but I can not reproduce it.
Hi, @cajames !
The client found and solved this issue.
In some languages "dot" becomes replaced with a "comma".
Resulting: max-width: 46,358983560944%;
where it should be max-width: 46.358983560944%;
My gallery.php
snippet is different than yours, I don't use $ratioPercent%
but you'll understand what I mean.
The fast solution we used is replacing line 39 in snippets/gallery.php
with
$finalRatio = str_replace(',', '.', $ratioWidth);
$imageStyle = "max-width: $finalRatio%;";
It does the work.
Ah, thanks for clarifying this @mynameisfreedom! 😊 I hadn't even thought about that haha. I'll look into it and ship a fix.
Hi, I just had the same problem: The gallery wouldn’t show up in the frontend. For now, I am applying the same hack as @mynameisfreedom:
$ratio = ($image['width']) / ($image['height']);
$ratioPercent = (($image['height']) / ($image['width'])) * ($ratio / $rowRatio) * 100;
$ratioWidth = ($ratio / $rowRatio) * 100;
$ratioPercent = str_replace(',','.',$ratioPercent);
$ratioWidth = str_replace(',','.',$ratioWidth);
$imageStyle = "width: $ratioWidth%; padding-bottom: $ratioPercent%;";
I'm not sure if it's me or the plugin, but I can't make it work with more than one langauge. Default language is showing the images, second language doesn't.