Skip to content

Taxonomies can't be created inside inspector using createNew #81

@connykaelinvisol

Description

@connykaelinvisol

Steps to reproduce:

  • create a vocabulary
  • create NodeType with a reference property referring to the created vocabulary
  • implement createNew in the editorOptions

example

...
  properties:
    keywordAssignments:
      type: references
      ui:
        label: Keywords
        reloadIfChanged: true
        showInCreationDialog: true
        inspector:
          group: tags
          position: 10
          editorOptions:
            allowEmpty: true
            multiple: true
            nodeTypes: [ 'Sitegeist.Taxonomy:Taxonomy' ]
            startingPoint: '/taxonomies/mycreatedtaxonomy'
            createNew:
              path: /taxonomies/mycreatedtaxonomy
              type: 'Sitegeist.Taxonomy:Taxonomy'

Actual behaviour:

Get error Call to a member function getContext() on null - Check the logs for details as the createNew action searches for the next parent DocumentNode. Sitegeist.Taxonomy:Root is not Neos.Neos:Document therefore no DocumentNode found.

What I tried so far:

To avoid the error above I overrode Sitegeist.Taxonomy:Root to declare it as Neos.Neos:Document and see, if this would work. It does not or just a bit more. The createNew action creates a new Sitegeist.Taxonomy:Taxonomy, but it's always empty. To set properties the action needs a context which is not available since the Sitegeist.Taxonomy:Root is nowhere in the NodeTree.

Technical details:

Neos version: 8.3.9
sitegeist/taxonomy version: 1.4.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions