No valid image was loaded.

  • Posted by TemplatePlazza (5215) Offline
You can edit this file :
/modules/mod_minifrontpagepro/Helper/MinifrontpageproHelper.php
around line 383 find this code 
if (JFile::exists(JPATH_ROOT.'/'.$orig_image)) {
$orig_image =$orig_image;
} else {

change it to :
if (JFile::exists(JPATH_ROOT.'/'.$orig_image)) {
// Adding a file check for corrupt image files
if(filesize(JPATH_ROOT.'/'.$orig_image) > 0) {
$orig_image = $orig_image;
}else {
if($custom_default_thumb){
$orig_image = $custom_default_thumb;
} else {
$orig_image = 'modules/mod_minifrontpagepro/tmpl/assets/default.png';
}
}
} else {
9 months 3 weeks ago - 9 months 3 weeks ago #25 by TemplatePlazza
Last edit: 9 months 3 weeks ago by TemplatePlazza.

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

Excellent. Will do. Thanks very much. 
9 months 3 weeks ago #26 by just GinA

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

I'm seeing an extra line in the code you want me to replace.  Your code has 3 lines, but the code in my file has 4 lines;
                        if (JFile::exists(JPATH_ROOT.'/'.$orig_image)) {
                            if(JFile::getSize(JPATH_ROOT.'/'.$orig_image)!== false) {
                                $orig_image = $orig_image;
                            }else {

I'm going to replace all 4 lines unless you clarify which lines to replace. 
9 months 3 weeks ago #27 by just GinA

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

  • Posted by TemplatePlazza (5215) Offline
Ah sorry, it's my previous attempt to fix the issue utilizing the Joomla method. It turns out that method didn't include a 'getSize' function so I use common php function. I have just implemented the fix to maxm.social please check
9 months 3 weeks ago #28 by TemplatePlazza

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

No, it does not work with No Filter for Custom Article ID's. I removed your Custom Article ID and selected No Filter, and it is throwing the same error. I changed the filter to display a different article than you chose and used the Article ID filter and it works fine.  

It looks like you still have some work to do so it doesn't throw that error when No Filter is selected. I can confirm this with the 2nd minifrontpagepro module in the debug position that has No Filter selected and it causes the error.
9 months 3 weeks ago #29 by just GinA

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

  • Posted by TemplatePlazza (5215) Offline
Hi, it's not related to the "No Filter for Custom Article ID's" issue, but it's still connected to the previous problem of image files being downloaded to your website. If the previous issue was caused by 0-byte problems, this time it's an inconsistent path issue. It appears that the path used for images consistently includes your domain address, but when I open the content using the TinyMCE editor, the path automatically omits the domain name part. If I re-save the article, the path returns to its correct path, without the domain name, and then the issue doesn't occur. (I attempted to change the default editor to "no editor" for the user GinA to see the actual URL stored in the content, but it seems your website security rules don't allow that)As a solution, I attempted to implement more thorough image checks, including for external files. I have already applied this to your website. Please check again whether it's working good now or not.
9 months 3 weeks ago #30 by TemplatePlazza

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

Powered by Kunena Forum