[MGNLDAM-606] Error restoring a deleted asset to its previous version Created: 27/Jul/15 Updated: 07/Jul/16 Resolved: 04/Jul/16 |
|
| Status: | Closed |
| Project: | Magnolia DAM Module |
| Component/s: | DAM App, User Interaction |
| Affects Version/s: | 2.0.9, 2.1 |
| Fix Version/s: | 2.0.14, 2.1.6 |
| Type: | Bug | Priority: | Neutral |
| Reporter: | Richard Gange | Assignee: | Robert Šiška |
| Resolution: | Fixed | Votes: | 3 |
| Labels: | support | ||
| Remaining Estimate: | 0d | ||
| Time Spent: | 2d 0.75h | ||
| Original Estimate: | Not Specified | ||
| Issue Links: |
|
||||||||||||||||||||||||||||||||||||
| 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
|
||||||||||||||||||||||||||||||||||||
| Date of First Response: | |||||||||||||||||||||||||||||||||||||
| Sprint: | Kromeriz 49, Kromeriz 51 | ||||||||||||||||||||||||||||||||||||
| Story Points: | 5 | ||||||||||||||||||||||||||||||||||||
| Description |
|
After deleting an asset, an editor is given the option to "Restore previous version". Performing this action restores the asset but throws an error. 2015-07-27 13:50:19,139 INFO info.magnolia.module.scheduler.CommandJob : Starting job [UI Action triggered execution of [default:markAsDeleted] by user [superuser]. (3)]... 2015-07-27 13:50:19,257 INFO info.magnolia.module.scheduler.CommandJob : Job executed successfully [UI Action triggered execution of [default:markAsDeleted] by user [superuser]. (3)] 2015-07-27 13:50:22,145 INFO info.magnolia.module.scheduler.CommandJob : Starting job [UI Action triggered execution of [default:restorePreviousVersion] by user [superuser]. (4)]... 2015-07-27 13:50:22,198 ERROR info.magnolia.module.scheduler.CommandJob : Cannot execute command restorePreviousVersion-default. javax.jcr.UnsupportedRepositoryOperationException: Unable to perform a versioning operation on a non versionable node: /magnolia-logo-print/description_files at org.apache.jackrabbit.core.version.VersionManagerImplBase.checkVersionable(VersionManagerImplBase.java:293) at org.apache.jackrabbit.core.version.VersionManagerImplBase.getVersionHistory(VersionManagerImplBase.java:354) at org.apache.jackrabbit.core.VersionManagerImpl.access$700(VersionManagerImpl.java:73) at org.apache.jackrabbit.core.VersionManagerImpl$4.perform(VersionManagerImpl.java:184) at org.apache.jackrabbit.core.VersionManagerImpl$4.perform(VersionManagerImpl.java:180) at org.apache.jackrabbit.core.session.SessionState.perform(SessionState.java:216) at org.apache.jackrabbit.core.VersionManagerImpl.perform(VersionManagerImpl.java:96) at org.apache.jackrabbit.core.VersionManagerImpl.getVersionHistory(VersionManagerImpl.java:180) at org.apache.jackrabbit.core.NodeImpl.getVersionHistory(NodeImpl.java:2997) at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getVersionHistory(DelegateNodeWrapper.java:267) at info.magnolia.jcr.wrapper.DelegateNodeWrapper.getVersionHistory(DelegateNodeWrapper.java:267) at info.magnolia.cms.core.version.BaseVersionManager.getAllVersions(BaseVersionManager.java:367) at info.magnolia.commands.impl.RestorePreviousVersionCommand.getPreviousVersion(RestorePreviousVersionCommand.java:141) at info.magnolia.commands.impl.RestorePreviousVersionCommand.restoreAllChildren(RestorePreviousVersionCommand.java:127) at info.magnolia.commands.impl.RestorePreviousVersionCommand.restore(RestorePreviousVersionCommand.java:100) at info.magnolia.commands.impl.RestorePreviousVersionCommand.execute(RestorePreviousVersionCommand.java:74) at info.magnolia.commands.MgnlCommand.executeSynchronized(MgnlCommand.java:81) at info.magnolia.commands.MgnlCommand.execute(MgnlCommand.java:70) at info.magnolia.module.scheduler.CommandJob.execute(CommandJob.java:135) at org.quartz.core.JobRunShell.run(JobRunShell.java:223) at org.quartz.simpl.SimpleThreadPool$WorkerThread.run(SimpleThreadPool.java:549) |
| Comments |
| Comment by Mikaël Geljić [ 16/Jun/16 ] |
|
Copying my comment on the duplicate issue here:
|
| Comment by Robert Šiška [ 16/Jun/16 ] |
|
Okay. That way we would have to change main, ui & dam. Also note, that this is originally from support ticket, so we need it at least on master & 5.3.x. (so that's, like, 6 PRs? phew.. On a related note: we noticed that now deprecated RestorePreviousVersionAction used to create a new version before restoring (the command doesn't do that). |
| Comment by Robert Šiška [ 21/Jun/16 ] |
|
Current solution:
|
| Comment by Mikaël Geljić [ 24/Jun/16 ] |
EDIT: includingChildren does work, here's what you get for not restarting the app... |
| Comment by Robert Šiška [ 01/Jul/16 ] |
|
ad edit2: restoring folders with children did work since |
| Comment by Philip Mundt [ 06/Jul/16 ] |
|
One thing I found when QAing the release of 5.3.15 was that the dam-image-provider, which uses the provided image generators caches the images and keeps the last image in cache even after restoring. To reproduce:
Created a followup issue: |