In-Portal Issue Tracker - In-Portal CMS
Viewing Issue Advanced Details
482 [In-Portal CMS] Front End feature request N/A 2009-12-23 03:12 2010-07-22 15:06
BaSSiST  
alex  
normal  
closed 5.0.2-B1  
fixed  
 
none 5.1.0-B1  
http://groups.google.com/group/in-portal-dev/browse_thread/thread/d3d46d605743a01b?hl=en
0
0000482: Automatic folder creation under "/system" folder
To be able to upload something it's required to create target folder (once per field) and "/resized" subfolder under it and set proper write permissions on them. Then created folder name should be specified in corresponding field declaration in unit config. This is potential place for typing errors, because developer could:

    * create one folder and then specify other folder name in unit config;
    * forgot to create folder or set correct permissions when deploying site on production/development server.

This is why automatic folder creation could speed-up development. Buy applying proposed approach (patch) we could gain advantages mentioned below:

    * eliminate potential error source;
    * automate process and increment development efficiency.


Proposed patch is just a start for automatic folder creation. For example folder creation code could be moved to central place, like FileHelper and used, when needed.
has duplicate 0000081closed  (5.1.0)alex Creating folders in writeable "/system" folder 
patch automatic_upload_folder_creation.patch (3,252) 2009-12-23 03:12
http://tracker.in-portal.org/file_download.php?file_id=187&type=bug
patch folder_auto_creation_core.patch (13,555) 2010-05-12 07:17
http://tracker.in-portal.org/file_download.php?file_id=535&type=bug
patch folder_auto_creation_modules.patch (6,164) 2010-05-12 07:17
http://tracker.in-portal.org/file_download.php?file_id=536&type=bug
rar system.rar (62,925) 2010-05-12 07:17
http://tracker.in-portal.org/file_download.php?file_id=537&type=bug
Issue History
2010-07-22 15:06 alex Note Added: 0002529
2010-07-22 15:06 alex Status resolved => closed
2010-06-08 22:43 Dmitry Relationship added has duplicate 0000081
2010-05-18 10:34 alex Changeset attached 5.1.x r13571
2010-05-18 10:31 alex Changeset attached 5.1.x r13570
2010-05-18 10:25 alex Note Added: 0002231
2010-05-18 10:25 alex Status reviewed and tested => resolved
2010-05-18 10:25 alex Fixed in Version => 5.1.0-B1
2010-05-18 10:25 alex Resolution open => fixed
2010-05-18 10:25 alex Changeset attached 5.1.x r13569
2010-05-18 10:17 alex Changeset attached 5.1.x r13568
2010-05-18 10:17 alex Changeset attached 5.1.x r13567
2010-05-18 10:17 alex Changeset attached 5.1.x r13566
2010-05-16 23:09 Dmitry Note Added: 0002218
2010-05-16 23:09 Dmitry Assigned To !COMMUNITY => alex
2010-05-16 23:09 Dmitry Status needs testing => reviewed and tested
2010-05-12 07:19 alex Note Added: 0002198
2010-05-12 07:19 alex Assigned To alex => !COMMUNITY
2010-05-12 07:19 alex Developer BaSSiST => alex
2010-05-12 07:19 alex Status needs work => needs testing
2010-05-12 07:18 alex Note Added: 0002197
2010-05-12 07:18 alex Assigned To !COMMUNITY => alex
2010-05-12 07:18 alex Status reviewed and tested => needs work
2010-05-12 07:17 alex File Added: system.rar
2010-05-12 07:17 alex File Added: folder_auto_creation_modules.patch
2010-05-12 07:17 alex File Added: folder_auto_creation_core.patch
2010-04-25 17:38 Dmitry Time Estimate Removed 1 =>
2010-04-25 17:38 Dmitry Note Added: 0001935
2010-04-25 17:38 Dmitry Status needs testing => reviewed and tested
2010-02-27 04:07 alex Developer => BaSSiST
2010-01-12 11:11 alex Time Estimate Added 1
2010-01-12 10:47 alex Target Version Icebox => 5.1.0
2009-12-23 03:12 alex Assigned To => !COMMUNITY
2009-12-23 03:12 alex Status active => needs testing
2009-12-23 03:12 alex Reporter alex => BaSSiST
2009-12-23 03:12 alex Target Version => Icebox
2009-12-23 03:12 alex New Issue
2009-12-23 03:12 alex File Added: automatic_upload_folder_creation.patch
2009-12-23 03:12 alex Reference => http://groups.google.com/group/in-portal-dev/browse_thread/thread/d3d46d605743a01b?hl=en

Notes
(0001935)
Dmitry   
2010-04-25 17:38   
Tested good!
(0002197)
alex   
2010-05-12 07:18   
Not completely done.
(0002198)
alex   
2010-05-12 07:19   
Now done.

Latest 2 patches are correct ones. I also propose to delete almost all empty folders under "/system" folder (new folder structure is attached in "system.rar"), since they will be automatically created when needed.

Test plan:
1. restore backup (when no backups are created) - creates "/system/backupdata"
2. create backup and then restore it - creates "/system/backupdata"
3. test upload in each possible place, where kUploadFormatter is used
4. perform import/export of links/products - creates "/system/export"
5. product/link import screen verify that already uploaded dropdown is prefilled properly - creates "/system/export"
6. upload manufacturer image - creates "/system/images/manufacturers"
7. create test template to display all manufacturers with scaled images on Front-End - creates "/system/images/manufacturers/resized"
8. upload image for any category item - creates "/system/images/pending/resized"
9. view uploaded images on category item details page - creates "/system/images/resized"
10. create poll with images - creates "/system/images/polls"
11. view poll on front-end - creates "/system/images/polls/resized"
12. open file browser in fck editor (any place) - creates "/system/user_files/Documents", "/system/user_files/Files", "/system/user_files/Flash", "/system/user_files/Media", "/system/user_files/Images"
13. respond to user for submission + add attachment in response - creates "/system/user_files/submission_log"
14. make successful USPS label request - creates "/system/user_files/labels"
15. install no longer requires deleted directories to be writable
16. csv export
17. language pack import/export
(0002218)
Dmitry   
2010-05-16 23:09   
Tested good, please commit!
(0002231)
alex   
2010-05-18 10:25   
Fix committed to 5.1.x branch. Commit Message:

Fixes 0000482: Automatic folder creation under "/system" folder
(0002529)
alex   
2010-07-22 15:06   
Closing, since 5.1.0 release has been released.