Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nodeTypesRegistry.getSubTypesOf doesnt work for abstract node types #3677

Closed
mhsdesign opened this issue Dec 20, 2023 · 0 comments
Closed

nodeTypesRegistry.getSubTypesOf doesnt work for abstract node types #3677

mhsdesign opened this issue Dec 20, 2023 · 0 comments

Comments

@mhsdesign
Copy link
Member

This is not a real issue but rather document the state as is.

With the bugfix neos/neos-development-collection#4561 (in Neos 8.3.7 and later) the node type schema size was reduced and optimized.

This leads to a necessary regression in the experimental plugin api of the neos ui: The javascript nodeTypesRegistry does not know about abstract node types! That means that for example fetching all subtypes of a mixin: getSubTypesOf wont work, as the schema doesnt contain the mixin.

This is generally not recommended to have such heavy logic computed on the frontend, instead the backend and frontendConfiguration should be preferred.

But to quickly fix this, you can use the internal api of the nodeTypeRoles like this:

Neos:
  Neos:
    Ui:
      nodeTypeRoles:
        'Vendor:MyRole': 'Vendor:Mixins.Role'

this leads to the node type still being included in the schema generation and thus makes getSubTypesOf function as previously.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant