Bug discovered deletes category image

  • Posts: 113
  • Thank you received: 18
8 years 6 months ago #236295

-- HikaShop version -- : 2.6.2
-- Joomla version -- : 3.5.1
-- PHP version -- : 5.6.17
-- Browser(s) name and version -- : Firefox 45.0.2
-- Error-message(debug-mod must be tuned on) -- : Not applicable

I discovered a bug in the use of category images that is fairly easy to recreate.

If two or more categories use the same image, editing any one of those categories to use a different image will cause the original image to be deleted even though it is still referenced by other categories.

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

  • Posts: 13201
  • Thank you received: 2322
8 years 6 months ago #236380

Hi,

Thank you for this report. You can download the latest package from our website, it includes this hot fix.
Or you can directly edit the file "administrator/components/com_hikashop/classes/file.php" and in the function "storeFiles()" replace:

if((empty($keepFiles) || !in_array($old,$keepFiles)) && JFile::exists($uploadPath . $old))
By:
if((empty($keepEntries) || !in_array($old,$keepEntries)) && JFile::exists($uploadPath . $old))

The following user(s) said Thank You: csymmonds, trevsmiff

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

Time to create page: 0.070 seconds
Powered by Kunena Forum