Error when using carousel with thumbnails

  • Posts: 2
  • Thank you received: 0
2 years 9 months ago #340076

-- 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.

Attachments:

Please Log in or Create an account to join the conversation.

  • Posts: 83022
  • Thank you received: 13403
  • MODERATOR
2 years 9 months ago #340090

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.

The following user(s) said Thank You: Osman

Please Log in or Create an account to join the conversation.

  • Posts: 2
  • Thank you received: 0
2 years 9 months ago #340091

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.059 seconds
Powered by Kunena Forum