[MGNLDAM-264] Cannot delete duplicated asset Created: 14/Jun/13 Updated: 25/Jun/13 Resolved: 14/Jun/13 |
|
| Status: | Closed |
| Project: | Magnolia DAM Module |
| Component/s: | None |
| Affects Version/s: | 1.0 |
| Fix Version/s: | 1.0 |
| Type: | Bug | Priority: | Critical |
| Reporter: | Federico Grilli | Assignee: | Eric Hechinger |
| Resolution: | Fixed | Votes: | 0 |
| 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
|
| Date of First Response: | |
| Sprint: | RC 2 |
| Description |
|
2013-06-13 16:18:27,925 ERROR info.magnolia.cms.core.version.BaseVersionManager : failed to copy versionable node to version store, reverting all changes made in this session This is due to the Reference property. Linking a Node using a reference involve integrity check (make a version of a Asset without having the original node already versioned will throw Integrity exception). Solution is to use Weak reference, that do not required integrity check. Strange is that the asset node type definition includes : but this is not taken into account when doing: workspace.copy(.. We have to explicitly ask for a weak reference: |
| Comments |
| Comment by Eric Hechinger [ 14/Jun/13 ] |
|
It works if the Parent node is Published (has a version) The duplicated Asset has a reference to the original one : |
| Comment by Eric Hechinger [ 14/Jun/13 ] |
|
In fact we have the same problem with publication. If we try to publish a duplicated asset with the original asset not yet versioned, same behavior. |
| Comment by Espen Jervidalo [ 25/Jun/13 ] |
|
this was sent to the userlist btw: Hi there, We have the following in a nodetype definition: .. and the following code … The Javadoc of javax.jcr.Node#setProperty(String name, Node value) says:
… so we assumed that the NT def would drive this decision. But when exporting nodeA, we see that the property was created as a (hard) Reference. Looking at the code of org.apache.jackrabbit.commons.AbstractNode#setProperty(String name, Node value), it looks like it's not trying at all to make any sort of informed decision, and just delegates to javax.jcr.ValueFactory#createValue(Node value) which is explicitly spec'd to create (hard) Reference properties. |