core icon indicating copy to clipboard operation
core copied to clipboard

When deleting a folder with content, folder does not get deleted

Open runwolf opened this issue 9 years ago • 2 comments

When you delete with the UI or webdav a folder that has content, the folder and the content desapear from the UI, but the folder stay in the identifier Table in the DB

after there is no way to re-create a folder with the same name without removing the entry for that folder in the identifier table.

Expected Behavior

You would be able to delete a folder and create one with the same name

Current Behavior

Possible Solution

Known Workarounds

Remove the entry in the identifier table by hand

Steps to Reproduce (for bugs)

  1. Create a folder name A
  2. Upload a file to the folder A
  3. Delete Folder A
  4. Create a Folder A

Your Environment

  • dotCMS version used: 3.7.1
  • Browser Name and version:
  • Operating System and version: Ubuntu
  • Application Server and version: Tomcat 8
  • Java Brand and version: Oracle Java 8
  • Database and version: MySql
  • Application module (if apply):

runwolf avatar Mar 01 '17 21:03 runwolf

  • [x] Insure that adding/deleting folders run through the folderAPI
  • [x] Create a unit test that reproduces the issue

wezell avatar Mar 14 '17 17:03 wezell

Passed QA. Tested this fix using Cyberduck and Finder as Webdav clients. Added and deleted many folders and contents inside the folders and was able to delete the folders thru webdav and UI. Checked DB and verify that folders don't exist in identifier table. I was able to recreate the folder again using the same name. Tested locally on master-4.1 / commit 044f2463efc7112283901b0da748b054a2ff7224 Mac OS 10.10 / MySQL 5.6.35 / Tomcat 8 / Java 8

shaydotcms avatar Apr 06 '17 14:04 shaydotcms