cancel
Showing results for 
Search instead for 
Did you mean: 

Why is 'Cut' not available?

hbf
Champ on-the-rise
Champ on-the-rise
Hi,

For some content items, the "Cut" action is not available, even when I am logged in as admin. What is the reason for this?

Thanks,
Kaspar
7 REPLIES 7

rivarola
Champ on-the-rise
Champ on-the-rise
Hello Kaspar,

The only evaluator restricting the visibility of the cut action in the default config is the CutNodeEvaluator which forbids this action on some multilingual document.
Are your node multilingual ?

hbf
Champ on-the-rise
Champ on-the-rise
Yes, indeed, my nodes are multilingual.

I am trying to understand the code/comment in CutNodeEvaluator.java:

/**
* Evaluates whether the Cut Node action should be visible.
*
* Among all available operations over non-multilingual documents (i.e. copy,
* delete, start discussion, etc), there is a missing one: <b>Move</b>.
* Translations cannot be moved due to the exiting link it has with the logical
* document. Despite it is technically achievable, it could be functionally
* troublesome. Spreading translations of the same semantic message among several
* spaces could lead to confusion and problems.
*
* If the node to move is a mlContainer, the user must have enough right to delete each translation
*
* @author Yannick Pignot
*/

Apparently, some ml containers can be moved but that does not help as (if I understand correctly) the ml containers live in "/{http://www.alfresco.org/model/content/1.0}multilingualRoot" and will therefore not be moved by a user.

Reading the comment, though, seems to suggest that it's technically possible to move ml nodes (I don't care if some translations lie around in different spaces, as long as the links to them still work).

So: Could I just overwrite CutNodeEvaluator.java with my own version which allows moves? Will this work or is moving for ml nodes not yet implemented?

(Of course, I can just do it, but I'd like to know whether there are known issues with it, whether it is "supported" in some sense.)

Thanks,
Kaspar

hbf
Champ on-the-rise
Champ on-the-rise
Could an Alfresco engineer please comment on this?

We have imported over 500 multilingual nodes and depend on this feature to organize content. Unfortunately, it is not documented anywhere that this feature is not available, so we are in a troublesome situation.

All I need to know: If I changed CutNodeEvaluator to allow nodes to be moved, will this break the repository integrity?

As I understand it, the move would move the cm:mlDocument while the cm:mlContainer would stay where it is (namely in /{http://www.alfresco.org/model/content/1.0}multilingualRoot). This may result in the cm:mlDocument's of an mlContainer being spread over different spaces. In our case, this is acceptable, so a configuration directive might be added to enable this, will the default is to not allow moves.

Kaspar

derek
Star Contributor
Star Contributor
The container should not be moved around.  If the document gets detached from the container, then that might be a problem.  The container doesn't care where the documents live.

hbf
Champ on-the-rise
Champ on-the-rise
Derek, thanks for your answer.

I only have a few more questions, for clarity:

1. Do all mlContainers live in "/cm:multilingualRoot"?

It seems so, if I look in the node browser.

But then, why does CutNodeEvaluator.java check this case? Web Client users cannot see the space "/cm:multilingualRoot". Does CutNodeEvaluator do this check just to be on the safe side?

2. Regarding containers that are moved around:

The container should not be moved around.

Understood. However, my code for sure will not actively move the container as we only work with nodes under "Company Home", and mlContainers live in "/cm:multilingualRoot". But I am wondering under what circumstances Alfresco might move the container?

For instance, when you rename a node, Alfresco actually moves it. Does something similar happen with mlContainers behind the scenes?

Thanks,
Kaspar

derek
Star Contributor
Star Contributor
The MLContainer should have children added/removed and properties set.  There should not be any moving of the container.  I'm rusty on that at the moment but that was the intention.

All containers should be invisible and live in the multilingualRoot.

I don't know about the CutNodeEvaluator.  It doesn't make sense, but I've not delved into that code for a while.  Does the evaluator ever use that logic that you know of?

hbf
Champ on-the-rise
Champ on-the-rise
The MLContainer should have children added/removed and properties set.  There should not be any moving of the container.  I'm rusty on that at the moment but that was the intention.

All containers should be invisible and live in the multilingualRoot.

Okay. Thanks for the clarification.

I don't know about the CutNodeEvaluator.  It doesn't make sense, but I've not delved into that code for a while.  Does the evaluator ever use that logic that you know of?

No, I don't see it making use of it.

I've posted a JIRA http://issues.alfresco.com/browse/AWC-1820 for the sake of completeness.

Regards,
Kaspar