neos-ui icon indicating copy to clipboard operation
neos-ui copied to clipboard

BUG: reference type in creation dialog doesn't work

Open tellenrieder opened this issue 2 years ago • 2 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues

Description

Using a property with reference type in the creation dialog in Neos 9 does not create the module and shows a red popup message with Given property "myProperty" is declared as "reference" in node type "My.Site:Foo.Bar" and must be treated as such. The selection of a page in the CD works as desired.

YAML

    myProperty:
      type: reference
      ui:
        label: 'My Reference Property'
        showInCreationDialog: true
        inspector:
          editor: 'Neos.Neos/Inspector/Editors/ReferenceEditor'
          editorOptions:
            nodeTypes: [ 'My.Site:Document.Page ]
      validation:
        Neos.Neos/Validation/NotEmptyValidator: {}

Steps to Reproduce

  1. define a property of the reference type with showInCreationDialog: true
  2. create the module in Neos and select a page
  3. click 'Create New'

Expected behavior

  • module is created with the correct selected page as value for this property

Actual behavior

  • module isn't created
  • error popup appears

Affected Versions

Neos 9 (not sure if the bug appeared since Neos 9 or even earlier) PHP 8.2

neos/neos-ui - 9.0.x-dev 684bb2f neos/neos-ui-compiled - 9.0.x-dev 9115a2e

Relates: neos/neos-development-collection#4549

tellenrieder avatar Sep 12 '23 16:09 tellenrieder

@skurfuerst I just found this entry on our project board which isn't an issue yet:

CreationDialogPropertiesCreationHandler: Do references work? (they won't) -> how to fix them? We need to create multiple commands after the first one -> NEW API!!!

Doesn't that fit to this bug report?

ahaeslich avatar Oct 05 '23 16:10 ahaeslich

With https://github.com/neos/neos-ui/pull/3519 we will introduce a new API capable of this. And can easily fix this.

mhsdesign avatar Feb 17 '24 10:02 mhsdesign