[MAGNOLIA-8820] File can't be deleted if version with none existing workspace is present Created: 09/Mar/23  Updated: 10/Mar/23

Status: Open
Project: Magnolia
Component/s: None
Affects Version/s: 6.2.26
Fix Version/s: None

Type: Bug Priority: Medium
Reporter: Horst Loepprich Assignee: Unassigned
Resolution: Unresolved Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Attachments: PNG File image-2023-03-09-08-56-28-870.png    
Template:
Acceptance criteria:
Empty
Task DoD:
[ ]* Doc/release notes changes? Comment present?
[ ]* Downstream builds green?
[ ]* Solution information and context easily available?
[ ]* Tests
[ ]* FixVersion filled and not yet released
[ ]  Architecture Decision Record (ADR)
Bug DoR:
[ ]* Steps to reproduce, expected, and actual results filled
[ ]* Affected version filled

 Description   

Steps to reproduce

  1. create workspace "downloads"
  2. add new asset to workspace
  3. update asset to create a version
  4. migrate asset do "dam" workspace
  5. delete workspace "downloads"
  6. try to delete migrated asset

Expected results

Asset and its versions get deleted. If a version with a reference to an non existing workspace exists an error is logged but the deletion still works.

Actual results

Asset can not be deleted and an error is thrown that lists the none existing workspace.

Workaround

Groovy Script that deletes the asset without failing.

Development notes

Error is thrown in BaseVersionManager.java:573 because Magnolia tries to get a session for a sourceWorkspace that does not exist anymore.

Either check if the sourceWorkspace still exists with the RepositoryManager or catch the NoSuchWorkspaceException and print the error to the log while removing the version.



 Comments   
Comment by Horst Loepprich [ 10/Mar/23 ]

Second workaround: recreate deleted workspace then the delete works.

Generated at Mon Feb 12 04:36:05 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.