In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
385 [In-Portal CMS] Data Management bug report always 2009-10-13 04:06 2011-09-19 16:08
alex  
alex  
normal  
closed 5.0.1  
fixed  
 
none 5.1.3-B2  
0
0000385: Copy/paste doesn't make category item filename unique
When item, e.g. product is copied from one category to other category, then it's Filename field's value stays the same. I suppose this happens because of maybe category item's filename should be unique only inside it's primary category OR Filename's field unique value just not updated during copy/paste operations.

When I edit such category item (the one I've just pasted to other category) and without changing any of the fields save it, then "_a" is added to it's filename resulting all detail page links on Front-End to be invalid.

I suppose, that "_a" should be added during cloning.
patch FilenameFix.patch (3,508) 2011-06-27 15:29
http://tracker.in-portal.org/file_download.php?file_id=1046&type=bug
patch filename_generation_v2.patch (9,358) 2011-06-28 08:42
http://tracker.in-portal.org/file_download.php?file_id=1047&type=bug
Issue History
2011-09-19 16:08 alex Note Added: 0003823
2011-09-19 16:08 alex Status resolved => closed
2011-06-28 08:46 alex Note Added: 0003570
2011-06-28 08:46 alex Status reviewed and tested => resolved
2011-06-28 08:46 alex Fixed in Version => 5.1.3-B2
2011-06-28 08:46 alex Resolution open => fixed
2011-06-28 08:46 alex Assigned To !COMMUNITY => alex
2011-06-28 08:46 alex Changeset attached 5.1.x r14394
2011-06-28 08:43 alex Note Added: 0003569
2011-06-28 08:43 alex Status needs testing => reviewed and tested
2011-06-28 08:43 alex Assigned To alex => !COMMUNITY
2011-06-28 08:43 alex Developer Dmitry => alex
2011-06-28 08:43 alex Status needs work => needs testing
2011-06-28 08:42 alex File Added: filename_generation_v2.patch
2011-06-27 15:45 Dmitry Note Added: 0003568
2011-06-27 15:29 Dmitry File Added: FilenameFix.patch
2011-06-27 02:55 alex Note Edited: 0003561 bug_revision_view_page.php?bugnote_id=0003561#r725
2011-06-27 02:54 alex Note Added: 0003561
2011-06-27 02:18 alex Note Edited: 0003554 bug_revision_view_page.php?bugnote_id=0003554#r723
2011-06-26 23:25 Dmitry Assigned To Dmitry => alex
2011-06-26 23:25 Dmitry Note Added: 0003554
2011-04-04 12:04 Dmitry Target Version Icebox => 5.1.3
2010-12-06 12:06 alex Target Version 5.1.2 => Icebox
2010-09-28 14:03 Dmitry Assigned To => Dmitry
2010-09-28 14:03 Dmitry Status active => needs work
2010-09-28 13:59 Dmitry Fixed in Version 5.1.1 =>
2010-09-28 13:59 Dmitry Target Version Icebox => 5.1.2
2010-09-28 13:40 Dmitry Developer => Dmitry
2010-09-28 13:40 Dmitry Fixed in Version => 5.1.1
2009-10-13 04:07 alex Target Version => Icebox
2009-10-13 04:06 alex New Issue

Notes
(0003554)
Dmitry   
2011-06-26 23:25   
(edited on: 2011-06-27 02:18)
Reminder sent to: alex

I have reviewed the current functionality and believe there is a bug in how it works now. Below, I'll describe how it should properly work. Please implement the changes and attach the patch:

1. Each CategoryItem MUST have UNIQUE Filename within one Category.

2. Each CategoryItem can be placed into multiple Categories so we should check for Filename uniqueness in all of it's Categories and not just Primary.

3. The general rule of thumb we can't have the SAME Filenames inside the SAME Category.


As you can see COPY functionality seems to be working correctly while ADD/EDIT is not. Please adjust accordingly.

(0003561)
alex   
2011-06-27 02:54   
(edited on: 2011-06-27 02:55)
Strange things happening in item creation process:
1. no filename at start
2. before item is assigned to a category check is made for unique filename
3. since no assigned category check is made across all database and wrong filename is generated
4. item is assigned to a category
5. check is made, that filename is unique in this category
6. all passes

Problem happens, when item creation in temp table happens in same time, when it's copied to live table.

For example, when you go to "Sections" tab on category item editing, then it's probably won't be a problem.

(0003568)
Dmitry   
2011-06-27 15:45   
Please find attached patch with fixes for Category Items.


TODO:

1. Make sure it works for Categories and ending is unique on one level. With new patch it uses Ending letter from across the DB.

2. Make sure separator for CategoryItem filenames is used from Configuration settings
(0003569)
alex   
2011-06-28 08:43   
Tested by developer, since too close to release.
(0003570)
alex   
2011-06-28 08:46   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0000385: Copy/paste doesn't make category item filename unique
(0003823)
alex   
2011-09-19 16:08   
Closing, since 5.1.3 release has been released.