- Posts: 2
- Thank you received: 0
Error when using carousel with thumbnails
4 years 6 months ago #340076
by Osman
Error when using carousel with thumbnails was created by Osman
-- url of the page with the problem -- : http://10.8.3.109:8023/index.php/tr/shop/product/fujitsu-b19-7-led-48-3cm-1280x1024-8ms-vga-dvi-gr/category_pathway-12
-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 8.0.14
-- Browser(s) name and version -- : Firefox 98.0
-- Error-message(debug-mod must be tuned on) -- : Please see screenshots
The carousel slider does not look good when used with thumbnail pagination.
I have analyzed it a little bit and my guess is, that that Hikashop injects class="lazyloaded" at the end of the image tag, but the image tag is not a normal html tag, but a property within the data-dot-tag.
carousel.php line 149 is correct, since it finishes the tag correctly:
$data = 'data-dot="<img title=\''.$this->escape(@$this->row->file_description).'\' alt=\''.$this->escape(@$this->row->file_name).'\' src=\''.$img->url.'\' />"';
BUT another command is injecting class="lazyloaded" into this tag, but does not take into account that this tag is not a real image tag.
If I remove the closing tag and write the command like this....
$data = 'data-dot="<img title=\''.$this->escape(@$this->row->file_description).'\' alt=\''.$this->escape(@$this->row->file_name).'\' src=\''.$img->url.'\' "';
...it does not inject anything (because it cannot find the closing tag), but the data-dot-property is wrong (the image tag is not closed).
For these reasons it looks like a programming error.
The script/command which injects the class="lazyloaded" should either ignore image tags within other attributes or inject it taking this issue into account.
-- HikaShop version -- : 4.5.0
-- Joomla version -- : 4.1.0
-- PHP version -- : 8.0.14
-- Browser(s) name and version -- : Firefox 98.0
-- Error-message(debug-mod must be tuned on) -- : Please see screenshots
The carousel slider does not look good when used with thumbnail pagination.
I have analyzed it a little bit and my guess is, that that Hikashop injects class="lazyloaded" at the end of the image tag, but the image tag is not a normal html tag, but a property within the data-dot-tag.
carousel.php line 149 is correct, since it finishes the tag correctly:
$data = 'data-dot="<img title=\''.$this->escape(@$this->row->file_description).'\' alt=\''.$this->escape(@$this->row->file_name).'\' src=\''.$img->url.'\' />"';
BUT another command is injecting class="lazyloaded" into this tag, but does not take into account that this tag is not a real image tag.
If I remove the closing tag and write the command like this....
$data = 'data-dot="<img title=\''.$this->escape(@$this->row->file_description).'\' alt=\''.$this->escape(@$this->row->file_name).'\' src=\''.$img->url.'\' "';
...it does not inject anything (because it cannot find the closing tag), but the data-dot-property is wrong (the image tag is not closed).
For these reasons it looks like a programming error.
The script/command which injects the class="lazyloaded" should either ignore image tags within other attributes or inject it taking this issue into account.
Please Log in or Create an account to join the conversation.
4 years 6 months ago #340090
by nicolas
Replied by nicolas on topic Error when using carousel with thumbnails
Hi,
I agree with you on all but one thing. The lazyload thing is not something we have in HikaShop or any extension we provide.
That's something added by the template or a third party extension you're using. So unfortunately, there is nothing we can do to prevent that on our end. You should report the issue to the extension/template adding that lazyload capability to your website and until they fix the code, disable that capability.
I agree with you on all but one thing. The lazyload thing is not something we have in HikaShop or any extension we provide.
That's something added by the template or a third party extension you're using. So unfortunately, there is nothing we can do to prevent that on our end. You should report the issue to the extension/template adding that lazyload capability to your website and until they fix the code, disable that capability.
The following user(s) said Thank You: Osman
Please Log in or Create an account to join the conversation.
4 years 6 months ago #340091
by Osman
Replied by Osman on topic Error when using carousel with thumbnails
Thanks a lot. You were right. It was really the template which distorted the image tag.
Please Log in or Create an account to join the conversation.
Time to create page: 0.158 seconds