- Posts: 23
COMMUNITY FORUM
- Forum
- K2 Community Forum
- English K2 Community
- Thousands of "File does not exist" errors daily causing server allocation issues
Thousands of "File does not exist" errors daily causing server allocation issues
- joanne
- Topic Author
- Offline
- Junior Member
Less
More
6 years 7 months ago #167369
by joanne
Replied by joanne on topic Thousands of "File does not exist" errors daily causing server allocation issues
Great, thank you for the suggestion Krikor. What do you think of this portion of code which is in the template found here: /templates/mytemplatename/code/com_k2/models
//Item image
if ($params->get('feedItemImage') && JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_'.$params->get('feedImgSize').'.jpg'))
{
$altText = $item->image_caption ? $item->image_caption : $item->title;
$item->description .= '<div class="K2FeedImage"><img src="'.JURI::root().'media/k2/items/cache/'.md5('Image'.$item->id).'_'.$params->get('feedImgSize').'.jpg" alt="'.$altText.'" /></div>';
}
//Item image
if ($params->get('feedItemImage') && JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_'.$params->get('feedImgSize').'.jpg'))
{
$altText = $item->image_caption ? $item->image_caption : $item->title;
$item->description .= '<div class="K2FeedImage"><img src="'.JURI::root().'media/k2/items/cache/'.md5('Image'.$item->id).'_'.$params->get('feedImgSize').'.jpg" alt="'.$altText.'" /></div>';
}
The topic has been locked.
- joanne
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
6 years 7 months ago #167370
by joanne
Replied by joanne on topic Thousands of "File does not exist" errors daily causing server allocation issues
item.php file
The topic has been locked.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
6 years 7 months ago #167374
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Thousands of "File does not exist" errors daily causing server allocation issues
Hello,
Does your template override the model as well?
Also the JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_'.$params->get('feedImgSize').'.jpg')) part checks to see whether an image is actually present, so this code looks good.
Furthermore if this is a commercial template, then you can ask the template's developer for guidance.
Does your template override the model as well?
Also the JFile::exists(JPATH_SITE.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.md5("Image".$item->id).'_'.$params->get('feedImgSize').'.jpg')) part checks to see whether an image is actually present, so this code looks good.
Furthermore if this is a commercial template, then you can ask the template's developer for guidance.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
- joanne
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
6 years 7 months ago #167383
by joanne
Replied by joanne on topic Thousands of "File does not exist" errors daily causing server allocation issues
Krikor, It is a custom template and I have no contact with them.
When you state: " Does your template override the model as well" - I'm unsure what you mean or where I should check for this. Would you please give me a little more info as to what to look for and where?
Thank you very much,
~J
When you state: " Does your template override the model as well" - I'm unsure what you mean or where I should check for this. Would you please give me a little more info as to what to look for and where?
Thank you very much,
~J
The topic has been locked.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
6 years 7 months ago #167391
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Thousands of "File does not exist" errors daily causing server allocation issues
I can only send you some guidance on how to locate the files you need to check
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
www.joomlaworks.net/blog/item/194-k2-inheritance-sub-templating
As for the actual code, since this is a custom template I am afraid I cannot provide any solid info.
getk2.org/documentation/tutorials/174-templating-with-k2-and-the-concepts-of-sub-templates
www.joomlaworks.net/blog/item/194-k2-inheritance-sub-templating
As for the actual code, since this is a custom template I am afraid I cannot provide any solid info.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
- joanne
- Topic Author
- Offline
- Junior Member
Less
More
- Posts: 23
6 years 7 months ago #167471
by joanne
Replied by joanne on topic Thousands of "File does not exist" errors daily causing server allocation issues
Thanks Krikor, I'm continuing to troubleshoot.
The topic has been locked.
- johncarter
- Offline
- New Member
6 years 7 months ago #167478
by johncarter
Replied by johncarter on topic Thousands of "File does not exist" errors daily causing server allocation issues
The only thing i've done is cleared cache in the Joomla admin area for JCH Optimize Pro plugin as the site is still under development and it's necessary to do that in order to see updates.You should scan your site to see in which items the image is missing and furthermore you need to double check your template to make sure that the image is not being requested if it is not present.
The topic has been locked.
- Krikor Boghossian
- Offline
- Platinum Member
Less
More
- Posts: 15920
6 years 7 months ago #167499
by Krikor Boghossian
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
Replied by Krikor Boghossian on topic Thousands of "File does not exist" errors daily causing server allocation issues
Forgot to add, that it might be a module as well.
The K2 Content module does have the proper check but a broken override or a 3rd party module might cause this issue.
The K2 Content module does have the proper check but a broken override or a 3rd party module might cause this issue.
JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)
The topic has been locked.
- Forum
- K2 Community Forum
- English K2 Community
- Thousands of "File does not exist" errors daily causing server allocation issues