No valid image was loaded.
- Posted by TemplatePlazza (5260) Offline
You can edit this file :
/modules/mod_minifrontpagepro/Helper/MinifrontpageproHelper.php
around line 383 find this code
change it to :
1 year 3 months ago - 1 year 3 months ago #25
by TemplatePlazza
/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 {
Last edit: 1 year 3 months ago by TemplatePlazza.
Please Log in or Create an account to join the conversation.
- Posted by just GinA (21) Offline
- Posted by just GinA (21) Offline
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;
I'm going to replace all 4 lines unless you clarify which lines to replace.
1 year 3 months ago #27
by just GinA
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.
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5260) 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
1 year 3 months ago #28
by TemplatePlazza
Please Log in or Create an account to join the conversation.
- Posted by just GinA (21) Offline
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.
1 year 3 months ago #29
by just GinA
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.
Please Log in or Create an account to join the conversation.
- Posted by TemplatePlazza (5260) 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.
1 year 3 months ago #30
by TemplatePlazza
Please Log in or Create an account to join the conversation.