Keyword

Deleting image of item leaves back xxx_Generic.jpg in media/k2/items/cache folder

  • Michael Moutafides
  • Michael Moutafides's Avatar Topic Author
  • Offline
  • New Member
More
15 years 2 months ago #72690 by Michael Moutafides
I tried to delete an image from an item and found out that all image files were deleted from media/k2/items/src and media/k2/items/cache (ie, the original image and all other resized images, like _XS, _S, _M, _L, _XL) but not the _Generic one!!!

to fix this issue just add the following in administrator/components/com_k2/models/item.php before line 287 in function save()

if (JFile::exists(JPATH_ROOT.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.$filename.'_Generic.jpg')) {
JFile::delete(JPATH_ROOT.DS.'media'.DS.'k2'.DS.'items'.DS.'cache'.DS.$filename.'_Generic.jpg');
}

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

More
15 years 2 months ago #72691 by Lefteris
Hi. Yes you are totally right. Fixed for the next release. Thanks for reporting this issue to us.

JoomlaWorks Support Team
---
Please search the forum before posting a new topic :)

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


Powered by Kunena Forum