[MAGNOLIA-2372] Nodes of the type ItemType.FOLDER cannot be activated Created: 17/Sep/08  Updated: 23/Jan/13  Resolved: 27/Feb/09

Status: Closed
Project: Magnolia
Component/s: core
Affects Version/s: 3.6.1
Fix Version/s: 4.0

Type: New Feature Priority: Major
Reporter: Will Scheidegger Assignee: Magnolia International
Resolution: Fixed Votes: 0
Labels: activation, folder, nodetype
Σ Remaining Estimate: Not Specified Remaining Estimate: Not Specified
Σ Time Spent: Not Specified Time Spent: Not Specified
Σ Original Estimate: Not Specified Original Estimate: Not Specified

Attachments: Text File ItemType.diff.java     Text File add_mgnl_folder_nodetype.txt    
Issue Links:
relation
is related to MAGNOLIA-2847 User Activation Issue Closed
is related to MGNLXAA-20 Activation of non orderable nodes Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-2407 Update existing nt:folder nodes to ne... Sub-task Closed Jan Haderka  
Template:
Patch included:
Yes
Acceptance criteria:
Empty
Date of First Response:

 Description   

Problem:

  • info.magnolia.cms.security.HierarchicalUserManager (magnolia-core) places the user accounts into a hierarchical node structure of the type ItemType.FOLDER.
  • info.magnolia.cms.core.ItemType.NT_FOLDER = "nt:folder";
    -> "nt:folder" is not minxin:referencable
    -> therefore does not have a UUID
    -> therefore cannot be activated / deactivated
    -> therefore also produces an error message when being deleted

Solution:

  • Changed ItemType.NT_FOLDER to "mgnl:folder"
  • added this custom nodetype definition to custom_nodetypes.xml:
    <nodeType hasOrderableChildNodes="true" isMixin="false" name="mgnl:folder" primaryItemName=""><supertypes><supertype>mix:referenceable</supertype><supertype>nt:folder</supertype></supertypes><propertyDefinition autoCreated="false" mandatory="false" multiple="false" name="" onParentVersion="COPY" protected="false" requiredType="undefined"/><childNodeDefinition autoCreated="false" defaultPrimaryType="" mandatory="false" name="" onParentVersion="COPY" protected="false" sameNameSiblings="true"><requiredPrimaryTypes><requiredPrimaryType>nt:base</requiredPrimaryType></requiredPrimaryTypes></childNodeDefinition></nodeType>

Note:
I don't know where else nodes of this type are being used. Therefore I cannot say if this change affects anything else. For me everything has worked fine after this change.



 Comments   
Comment by Will Scheidegger [ 17/Sep/08 ]

The nodetype definition for mgnl:folder which I inserted in the text got corrupted by confluence. Therefore I attached it again in a text file.

Comment by Magnolia International [ 17/Sep/08 ]

Thanks Will !

Ideally - create patch files using the following command
svn diff > foobar.patch (using a more appropriate filename, obviously)
The best being executing this from the root of the project, so we don't even have to search for the correct folder from where to apply it.

Comment by Magnolia International [ 03/Oct/08 ]

new nodetype definition committed, constant changed.
For now, UsersTreeConfiguration shows both mgnl:folder and nt:folder (with a grayed icon for the latter)

TODO: update task and clean UsersTreeConfiguration

Comment by Will Scheidegger [ 10/Oct/08 ]

The custom nodetype definition above does not work anymore since Mag 3.6.3. Apparently the name="" causes the problems. When you replace the name="" with name="*" things seem to work again.

Comment by Magnolia International [ 10/Oct/08 ]

yeah we slightly modified your patch before applying - see the subversion commits tab.

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