[DOCU-2020] CLONE - DialogCreationContext attributes are not initialised Created: 10/Jun/20  Updated: 12/Jun/20  Resolved: 11/Jun/20

Status: Closed
Project: Documentation
Component/s: None
Affects Version/s: None
Fix Version/s: None

Type: Task Priority: Major
Reporter: Richard Gange Assignee: Martin Drápela
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
documentation
documents BLOSSOM-269 DialogCreationContext attributes are ... Closed
relation
Template:
Acceptance criteria:
Empty
Task DoR:
Empty
Date of First Response:
Epic Link: 2020 mgnl-staff requests
Sprint: Docu Sprint 79
Story Points: 0.5

 Description   

From Mika's comment

"This cannot be reproduced *in the old Pages app*.
—while of course it happens in the new Pages app. => https://documentation.magnolia-cms.com/display/DOCS62/Blossom+module+release+notes

Version 3.4 states:

[Blossom] has been migrated to the 6 UI framework (non-compatibility), but old-style compatibility dialogs can still be registered.
The module provides support for simple dialogs configured by code. However, there are still certain objects that the old BlossomFormDialogPresenter used to make injectable, mostly Vaadin 7 items, JCR Node and node path. For the time being, please keep using the Pages compatibility app for these use cases (emphasis mine). Magnolia 6 UI framework does not have configurable form-dialog presenters, nor Vaadin 7 items.

Now I acknowledge with version 3.4.1 out, it may seem that this no longer applies, but it does. We'll make the up-to-date status more explicit in that regard."



 Comments   
Comment by Richard Gange [ 10/Jun/20 ]

The issue is still persisting. I was able to easily recreate the problem by adjusting the Text Dialog:

@DialogFactory("custom-text-dialog")
public class TextDialog {

    @TabFactory("Content")
    public void contentTab(UiConfig cfg, DamConfig dam, TabBuilder tab, Node node) 
            throws RepositoryException {
        
        node.getName(); // null pointer occurs here
        
        tab.fields(
                cfg.fields.text("heading").label("Dialog > Heading"),
                dam.fields.assetLink("photo").label("Dialog > Photo"),
                cfg.fields.richText("body").label("Dialog > Text body")
        );
    }
}
2020-06-10 18:01:48,942 ERROR le.blossom.dialog.DialogCreatorDefinitionDecorator: Failed to create dialog for class info.magnolia.blossom.sample.module.dialogs.components.TextDialog
java.lang.NullPointerException: null
	at info.magnolia.blossom.sample.module.dialogs.components.TextDialog.contentTab(TextDialog.java:55) ~[magnolia-blossom-sample-module-3.4.2-SNAPSHOT.jar:?]
	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) ~[?:1.8.0_181]
	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62) ~[?:1.8.0_181]
	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43) ~[?:1.8.0_181]
	at java.lang.reflect.Method.invoke(Method.java:498) ~[?:1.8.0_181]
	at org.springframework.util.ReflectionUtils.invokeMethod(ReflectionUtils.java:282) ~[spring-core-5.1.9.RELEASE.jar:5.1.9.RELEASE]
	at info.magnolia.module.blossom.support.MethodInvocationUtils.invoke(MethodInvocationUtils.java:70) ~[magnolia-module-blossom-3.4.2-SNAPSHOT.jar:?]
	at info.magnolia.module.blossom.dialog.DefaultDialogCreator.invokeClassDialogFactory(DefaultDialogCreator.java:178) ~[magnolia-module-blossom-3.4.2-SNAPSHOT.jar:?]
	at info.magnolia.module.blossom.dialog.DefaultDialogCreator.createDialog(DefaultDialogCreator.java:138) ~[magnolia-module-blossom-3.4.2-SNAPSHOT.jar:?]
	at info.magnolia.module.blossom.dialog.DialogCreatorDefinitionDecorator.decorate(DialogCreatorDefinitionDecorator.java:93) ~[magnolia-module-blossom-3.4.2-SNAPSHOT.jar:?]
	at info.magnolia.config.registry.decoration.CachingDefinitionDecorator.decorate(CachingDefinitionDecorator.java:74) ~[magnolia-configuration-6.2.1.jar:?]
	at info.magnolia.config.registry.AbstractRegistry.getDecoratedDefinitionProvider(AbstractRegistry.java:146) ~[magnolia-configuration-6.2.1.jar:?]
	at info.magnolia.config.registry.AbstractRegistry.getProvider(AbstractRegistry.java:119) ~[magnolia-configuration-6.2.1.jar:?]
Comment by Mikaël Geljić [ 11/Jun/20 ]

This cannot be reproduced **in the old Pages app**.
—while of course it happens in the new Pages app. => https://documentation.magnolia-cms.com/display/DOCS62/Blossom+module+release+notes

Version 3.4 states:

[Blossom] has been migrated to the 6 UI framework (non-compatibility), but old-style compatibility dialogs can still be registered.
The module provides support for simple dialogs configured by code. However, there are still certain objects that the old BlossomFormDialogPresenter used to make injectable, mostly Vaadin 7 items, JCR Node and node path. For the time being, please keep using the Pages compatibility app for these use cases (emphasis mine). Magnolia 6 UI framework does not have configurable form-dialog presenters, nor Vaadin 7 items.

Now I acknowledge with version 3.4.1 out, it may seem that this no longer applies, but it does. We'll make the up-to-date status more explicit in that regard.

Generated at Mon Feb 12 01:23:21 CET 2024 using Jira 9.4.2#940002-sha1:46d1a51de284217efdcb32434eab47a99af2938b.