[Skip to main content](#vessel-content)

#   Bug discovered deletes category image

##

- **[csymmonds](/forum/user/9149-csymmonds "View csymmonds's Profile")**
- [![csymmonds's Avatar](https://www.hikashop.com/media/kunena/core/svg/person.svg)](/forum/user/9149-csymmonds "View csymmonds's Profile") Topic Author
- [ Offline](/forum/user/9149-csymmonds)

Less More

- Posts: 113
- Thank you received: 18
-
-

10 years 6 months ago [\#236295](#236295) by [csymmonds](/forum/user/9149-csymmonds "View csymmonds's Profile")  *[Bug discovered deletes category image](/forum/2-general-talk-about-hikashop/883793-bug-discovered-deletes-category-image#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.")* was created by *[csymmonds](/forum/user/9149-csymmonds "View csymmonds's Profile")*

-- 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](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg4Mzc5My1idWctZGlzY292ZXJlZC1kZWxldGVzLWNhdGVnb3J5LWltYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

- **[Xavier](/forum/user/4105-xavier "View Xavier's Profile")**
- [![Xavier's Avatar](https://www.hikashop.com/media/kunena/avatars/resized/size144/users/avatar4105.png)](/forum/user/4105-xavier "View Xavier's Profile")
- [ Offline](/forum/user/4105-xavier)

Less More

- Posts: 13201
- Thank you received: 2322
-
-
-
- [](http://www.kidiweb.fr)
-

10 years 6 months ago [\#236380](#236380) by [Xavier](/forum/user/4105-xavier "View Xavier's Profile")  Replied by *[Xavier](/forum/user/4105-xavier "View Xavier's Profile")* on topic *[Bug discovered deletes category image](/forum/2-general-talk-about-hikashop/883793-bug-discovered-deletes-category-image#236380 "-- 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.")*

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: Code:

if((empty($keepFiles) &#124;&#124; !in_array($old,$keepFiles)) &amp;&amp; JFile::exists($uploadPath . $old))

By: Code:

if((empty($keepEntries) &#124;&#124; !in_array($old,$keepEntries)) &amp;&amp; JFile::exists($uploadPath . $old))

The following user(s) said Thank You: [csymmonds](/forum/user/9149-csymmonds "View csymmonds's Profile"), [trevsmiff](/forum/user/9214-trevsmiff "View trevsmiff's Profile")

Please [Log in](/login?return=aHR0cHM6Ly93d3cuaGlrYXNob3AuY29tL2ZvcnVtLzItZ2VuZXJhbC10YWxrLWFib3V0LWhpa2FzaG9wLzg4Mzc5My1idWctZGlzY292ZXJlZC1kZWxldGVzLWNhdGVnb3J5LWltYWdlP3RtcGw9bWFya2Rvd24=) or [Create an account](/register) to join the conversation.

Board Categories HikaShop Install &amp; Update Product &amp; Category Display Content Creation Sales and Orders Orders management Reports &amp; Statistics Customers Checkout Payment Methods Shipping Methods Import &amp; Export (CSV, XLS…) Specific Features Affilation Taxes Wishlist Vote Carousel &amp; Slider Mass Actions Filters &amp; Search Discount &amp; Coupon Feature Request Integrations Showcase General Talk about HikaShop Development HikaShop 3.0 Beta Translation Commercial Jobs HikaShop Components HikaMarket Market: Feature requests Market: How to? Market: Bug Report HikaSerial General talk about HikaSerial Serial: Bug Report Serial: How to? Support en Français de HikaSerial (French Support) HikaSubscription HikaAuction Auction: Feature requests Auction: How to? Auction: Bug report Hikashop around the world Support en Français (French Support) Russian FAQ. Курс выживания с Hikashop. Частые вопросы и о Расширения Hikashop Наши сайты на Hikashop 日本語版サポート(Japanese Support) Thai German Archives Bug Report How to?

[](/forum/topics/feed/mode-topics?format=feed&type=rss)

Time to create page: 0.074 seconds

[Powered by](/forum/credits) [Kunena Forum](https://www.kunena.org)
