[MGNLDAM-541] MoveFCKEditorContentToDamMigrationTask resulting in InvalidItemStateException when node contains more than one FCK upload Created: 01/Feb/15  Updated: 12/Mar/21  Resolved: 12/Mar/21

Status: Closed
Project: Magnolia DAM Module
Component/s: DAM App
Affects Version/s: 2.0.6
Fix Version/s: None

Type: Bug Priority: Critical
Reporter: Will Scheidegger Assignee: Unassigned
Resolution: Obsolete Votes: 2
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

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   

When the migration task moves the FCK uploaded binaries to the DAM it also removes them from the website repository. Unfortunately however it seems that it does not actually remove the binary but the "text_files" node which contains the binaries. As soon as you have more than one FCK uploaded file in such a node, handling of the second upload will result in this error message:

2015-02-01 22:42:52,428 ERROR info.magnolia.module.InstallContextImpl : > Could not install or update gruene module. Task 'Migration task: Migrate Uploaded content to DAM repository' failed. (TaskExecutionException: javax.jcr.InvalidItemStateException: Item does not exist anymore: a5ccd317-e5a5-4b8a-9131-fb4feb18547d)
info.magnolia.module.delta.TaskExecutionException: javax.jcr.InvalidItemStateException: Item does not exist anymore: a5ccd317-e5a5-4b8a-9131-fb4feb18547d
at info.magnolia.dam.app.setup.migration.MoveContentToDamMigrationTask.doExecute(MoveContentToDamMigrationTask.java:158)
at info.magnolia.module.delta.AbstractRepositoryTask.execute(AbstractRepositoryTask.java:57)
at info.magnolia.module.ModuleManagerImpl.applyDeltas(ModuleManagerImpl.java:514)
at info.magnolia.module.ModuleManagerImpl.installOrUpdateModule(ModuleManagerImpl.java:496)
at info.magnolia.module.ModuleManagerImpl$1.doExec(ModuleManagerImpl.java:274)
.....

The problem occurs on line 137 of MoveFCKEditorContentToDamMigrationTask where the "fileNode" is being removed. Instead I think the "resourceNode" should be removed. However, when this is changed, the unit tests fail...?



 Comments   
Comment by Will Scheidegger [ 02/Feb/15 ]

I modified the code according to the description above and built the module skipping the tests. Afterwards the migration task worked fine also an text blocks with multiple fck uploaded files. Attention: At the same time I also fixed the path where the upload is being copied to according to MGNLDAM-542.

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