Quote

We're also available for Custom Joomla Development

Hire us now

Related Items extended not showing images properly

I just upgraded from version 1.3.1 to 1.7.1. Now some of the links to related articles show broken images as seen in the attached picture. It seems to be random, which pictures show and which do not; at least I cannot find a pattern. Any suggestions what's going on?
Resolved
The discussion has been resolved.

Accepted Answer

14 responses Add Yours
     
  • Replied by mehinger on Friday, July 07 2017, 05:59 PM · Hide· #1
    Great, that seems to have solved the problem! :-)
  •  
  • Replied by admin on Friday, July 07 2017, 05:20 PM · Hide· #2
    Anyway, can you try to edit the file :
    ../modules/mod_relateditems_xtd/tmpl/default.php

    change the lines 43-44

    $pattern = '/<img.+src=[\'"](?P<src>.+?)[\'"].*>/i';
    			//$pattern .= '+([^"\'>\\s]+)/is';


    to
    $pattern = '/<img[^>]+src[\\s=\'"]';
    				$pattern .= '+([^"\'>\\s]+)/is';
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by admin on Friday, July 07 2017, 05:03 PM · Hide· #3
    Can you try to you install the version 1.3.1 and check whether it works or not?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by mehinger on Friday, July 07 2017, 04:44 PM · Hide· #4
    I used to have 1.3.1 installed.
  •  
  • Replied by admin on Friday, July 07 2017, 04:42 PM · Hide· #5
    HI, sorry I still have no clue :( I'm also still unable to replicate the issue on my local computer, it works fine for both of <img tag separated by <p or without separator.
    Could you tell me what related extended version do you have before, so I can try to find the difference between those versions?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by mehinger on Friday, July 07 2017, 12:25 PM · Hide· #6
    Still no progress?
  •  
  • Replied by mehinger on Friday, July 07 2017, 07:03 AM · Hide· #7
    Already did that, but I will try it again … and now, they are deleted.
  •  
  • Replied by admin on Friday, July 07 2017, 06:50 AM · Hide· #8
    Hmm maybe it because both of <img and <iframe tag do have similiar 'src' attribute, but I have already re-checked the regex code and it should be working fine.
    Anyway, can you try to delete all images under /undervisning/images/relateditemsxtd/ so the module will recreate the thumbnails again?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by mehinger on Friday, July 07 2017, 06:29 AM · Hide· #9
    OK, I think I have zoomed in on the problem here! The first line of an article where the image doesn't show properly in the Related Items extended module reads like this:

    <p><img src="/images/related-items-images/11/hqdefault06.jpeg" alt="Den helande ödlan i Bolivia" width="0" height="0" />
    	<iframe src="/https://www.youtube.com/embed/tb0_ZeHYayA" frameborder="0" width="640" height="360" allowfullscreen="allowfullscreen"></iframe>
    </p>


    However, when I change it to this, the image is rendered correctly:

    <p><img src="/images/related-items-images/11/hqdefault06.jpeg" alt="Den helande ödlan i Bolivia" width="0" height="0" /></p>
    	<p><iframe src="/https://www.youtube.com/embed/tb0_ZeHYayA" frameborder="0" width="640" height="360" allowfullscreen="allowfullscreen"></iframe>
    </p>


    Reference: http://ehinger.nu/undervisning/starta-har/nyheter/6882-den-helande-odlan-i-bolivia.html (related to http://ehinger.nu/undervisning/starta-har/nyheter/6867-den-manskliga-befolkningsexplosionen.html)
  •  
  • Replied by mehinger on Friday, July 07 2017, 06:24 AM · Hide· #10
    Yes, you are missing something. :) The images have a size of 0x0 pixels, because I didn't want them to show in the article, but in the related items module, I wanted them to show. It worked with no problems in the previous version, and it still works for the related items that do show up. I also tried setting some images to their original sizes, and this didn't solve the problem.

    Could there be some trouble rendering the image for the Related Items extended module? I noticed in the rendered HTML code the links to the missing images seem broken.
  •  
  • Replied by admin on Friday, July 07 2017, 06:17 AM · Hide· #11
    I tried to open an article with missing thumbnail, and I found that indeed that article doesn't have any image on it.
    https://www.dropbox.com/s/sob5i6hwh0nh0kn/kz1mo.jpg?raw=1
    I think the only issue is, that the module should be displaying a default image thumbnail instead of displaying a broken img icon.
    Am I missing something?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  • Replied by mehinger on Friday, July 07 2017, 06:10 AM · Hide· #12
    Yes, no problems before upgrading (except some bugs that were fixed in the upgraded version). I have now provided the url in the site details attached.
  •  
  • Replied by admin on Friday, July 07 2017, 06:05 AM · Hide· #13
    Also did it work good before you upgraded it?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
  •  
  •  
    Replied by admin on Friday, July 07 2017, 06:04 AM · Hide· #14
    Hi, could you let me know the URL of your site so I can take a look?
    Please post rating at the Joomla! Extensions Directory - http://extensions.joomla.org/profile/profile/details/264
Your Response
Please login first in order for you to submit comments