[MAGNOLIA-2810] Dialog node type: fix all our bootstrap files and create update task! Created: 07/Jul/09  Updated: 23/Jan/13  Resolved: 10/Mar/10

Status: Closed
Project: Magnolia
Component/s: admininterface, templating, workflow
Affects Version/s: 4.1, 4.0.2
Fix Version/s: 4.3

Type: Improvement Priority: Major
Reporter: Magnolia International Assignee: Federico Grilli
Resolution: Fixed Votes: 0
Labels: None
Σ 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: File list of affected dialog definitions    
Issue Links:
relation
is related to MAGNOLIA-2573 dialog configuration: the dialog node... Closed
is related to MAGNOLIA-3682 Change node type of dialogs from cont... Closed
is related to MGNLCMNT-22 Fix dialog node types Closed
is related to MGNLDATA-98 Fix dialog node types Closed
is related to MGNLDMS-181 Fix dialog node types Closed
is related to MGNLRES-23 dialog node type Closed
is related to MGNLCAT-17 Fix dialog node types Closed
is related to MGNLFORUM-96 Fix dialog node types Closed
is related to MGNLINTEMPL-14 Fix dialog node types Closed
is related to MGNLPCK-38 Fix dialog node types Closed
is related to MGNLPUR-42 Fix dialog node types Closed
is related to MGNLRSSAGG-30 Fix dialog node types Closed
is related to MGNLSTK-598 Fix dialog node types Closed
is related to MGNLWIKI-46 Fix dialog node types Closed
Sub-Tasks:
Key
Summary
Type
Status
Assignee
MAGNOLIA-3116 Create a neutral node type changing t... Sub-task Closed Federico Grilli  
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)
Date of First Response:

 Description   

When updating or even installing a clean instance, there are tons of unnecessary log messages such as:

 WARN: Dialog definitions should be of type contentNode but [/modules/abc/dialogs/paragraphs/xyz] is of type content.

we should fix our own content!
(and consider writing an update task)



 Comments   
Comment by Zdenek Skodik [ 17/Feb/10 ]

There appears the questions related to this topic repeatedly, so I'm going to fix it (btw 4.2.x was marked as fix version previously).
I personally prefer to fix our own dialog definitions rather than decrease level of log messages or
even rewrite the related piece of code at DialogHandlerManager.

Comment by Zdenek Skodik [ 17/Feb/10 ]

list is attached ~ 42 items/14 modules

Comment by Zdenek Skodik [ 22/Feb/10 ]

Changing dialog node type seems to me ok for standard dialog definitions, but I don't like it in case of generics at all.
If we still want to store generic tabs for dialogs as it's (under folders; which I guess we want because of transparency)
we'll have to update the code when there is the direct check for existence of content type for the dialog node:

info.magnolia.module.admininterface.DialogHandlerManager
try {
    if(dialogNode.getItemType().equals(ItemType.CONTENT)){
        log.warn("Dialog definitions should be of type contentNode but [" + dialogNode.getHandle() + "] is of type content.");
    }
}
catch (RepositoryException e) {
    log.error("Can't check for node type of the dialog node [" + dialogNode.getHandle() + "]: " + ExceptionUtils.getMessage(e), e);
    throw new IllegalStateException("Can't check for node type of the dialog node [" + dialogNode.getHandle() + "]: " + ExceptionUtils.getMessage(e));
}

I don't see any really important reason why we should do such a check especially when the type actually have no impact on functionality,
at least we would allow mgnl:content and mgnl:contentNode. Any opinions are welcome.

Comment by Jan Haderka [ 22/Feb/10 ]

There is a reason why this issue is linked to another - original issue - MAGNOLIA-2573, says the change is due to ability to distinguish between folders and dialogs.
Folders = ItemContent.CONTENT type, dialogs = ItemContent.CONTENT_NODE type.
Also the difference is very apparent when you want to search and filter results based on the node type to limit search results to dialog nodes only.

As for generic tabs - we can either change type of the subfolders (pages, controls, teasers to ItemContent.CONTENT_NODE if the warning bothers you too much. Or (imho) we can keep it as is, since indeed those are not the dialogs and should not be recognized as such, so the warning is perfectly appropriate and once we enforce the type, they will no longer be mapped.

Unrelated to the issue: please distinguish between "generics" which refers to the erasure of types in java code and "generic" which is just a folder name for generic tabs in STK.

Comment by Zdenek Skodik [ 23/Feb/10 ]

yep I am also for the generic tabs organization under folders, I was only that the content type check goes directly against it,
but ok I can let the node type of generic tabs parent nodes as it is.

Comment by Philipp Bärfuss [ 09/Mar/10 ]

I suggest the following improvements

  • extract a changeNodeType utility method
  • create a neutral node type changing task (reusable for other similar use cases)
  • the dialog specific task (crawling through all dialogs) should go into the admininterface module
Comment by Federico Grilli [ 09/Mar/10 ]

Yes, that would ideally be the next steps but I wanted to test this better before making it generic and reusable.

Comment by Federico Grilli [ 10/Mar/10 ]

Will create a subtask for this improvement

create a neutral node type changing task (reusable for other similar use cases)

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