Change By: Eric Hechinger (14/Jun/13 5:24 PM)
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
2013-06-13 16:18:27,925 ERROR gnolia.ui.framework.action.MarkNodeAsDeletedAction: Could not execute command operation.
info.magnolia.ui.api.action.ActionExecutionException: org.apache.commons.lang.exception.NestableException: Exception during executing command
at info.magnolia.ui.framework.action.AbstractCommandAction.execute(AbstractCommandAction.java:167)





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 :
    <propertyDefinition name="master" requiredType="WeakReference" autoCreated="false" mandatory="false" _onParentVersion_="COPY" protected="false" multiple="false" isFullTextSearchable="false" isQueryOrderable="false"/>

but this is not taken into account when doing:  workspace.copy(..

We have to explicitly ask for a weak reference: 
            Value refValue = copyNode.getSession().getValueFactory().createValue(originalNode, true);
            copyNode.setProperty(DamNodeTypes.Asset.MASTER, refValue);
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira



----------------------------------------------------------------
For list details, see: http://www.magnolia-cms.com/community/mailing-lists.html
Alternatively, use our forums: http://forum.magnolia-cms.com/
To unsubscribe, E-mail to: <[email protected]>
----------------------------------------------------------------

Reply via email to