Again: article without images gives a error in .

Hello, with minifronpage 5.0.1, I get the following error, see attachment, for an article without an image.
Test both cases:
- article with no image
- article with image, but it can not be found.
I looked at the origin, and find the reason.
The  $custom_default_thumb contains a #: 
images/logos/banners/LB-logo2020.png#joomlaImage://local-images/logos/banners/LB-logo2020.png?width=480&height=480
The $custom_default_thumb has a to be stripped after the #, like as is done in line 219:

line 332 of MiniFrontpageHelper.php:
                    if (File::exists(JPATH_ROOT.'/'.$orig_image)) {
                        $orig_image =$orig_image;
                    } else {
                        if($custom_default_thumb){
                            $file_ext = File::getExt($custom_default_thumb);
//added pch 6-10-2025
                            $custom_default_thumb = strstr($custom_default_thumb, '#', true);

                            if($file_ext == 'png'){

Best regards,
Peter
1 week 5 days ago - 1 week 5 days ago #1 by Peter
Attachments:
Last edit: 1 week 5 days ago by Peter.

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

  • Posted by TemplatePlazza (5342) Offline
Hi Peter, how can I replicate the issue? Can you please tell me the exact steps you took? I’m unable to reproduce it on my end.
The custom default should already be stripped on line 219.
1 week 5 days ago #2 by TemplatePlazza

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

Hello,

You can replicate this easily with an article with an image that can not be found (add image and delete the physical image).

The Custom Default Thumbnail is in my case.
images/logos/banners/LB-logo2020.png#joomlaImage://local-images/logos/banners/LB-logo2020.png?width=480&height=480

Best solution place the line strstr($custom_default_thumb, '#', true); above if($orig_image == "") and remove after $size_multiplier = 3

          $custom_default_thumb = strstr($custom_default_thumb, '#', true);
            // If article doesn't have any image then generate thumbnail from the default image / custom default thumb
            if($orig_image == ""){
                $size_multiplier = 3; // to generate retina quality of thumbnail
//                $custom_default_thumb = strstr($custom_default_thumb, '#', true); 
 
1 week 3 days ago - 1 week 3 days ago #3 by Peter
Last edit: 1 week 3 days ago by Peter.

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

  • Posted by TemplatePlazza (5342) Offline
Is the System Cache enabled in your Global Configuration?
1 week 3 days ago #4 by TemplatePlazza

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

No, System Cache is OFF
1 week 3 days ago #5 by Peter

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

  • Posted by TemplatePlazza (5342) Offline
I'm still unable to replicate the issue. Please check my video and see if there’s any step I might have missed
www.dropbox.com/scl/fi/odwb0qewed6kperkz...9g&st=7jnuincz&raw=1
1 week 3 days ago #6 by TemplatePlazza

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

Powered by Kunena Forum