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

Dynamic SelectOptionCollection does not work anymore in Neos 9 #143

Open
dlubitz opened this issue Nov 12, 2024 · 0 comments
Open

Dynamic SelectOptionCollection does not work anymore in Neos 9 #143

dlubitz opened this issue Nov 12, 2024 · 0 comments
Labels

Comments

@dlubitz
Copy link
Contributor

dlubitz commented Nov 12, 2024

If you want to use a dynamic SelectOptionCollection as value-label pairs for select options in Neos 9, this will be broken.

    // ...
    properties {
        options = Neos.Form.Builder:SelectOptionCollection {
            items = ${q(site).children('[instanceof Some.Package:NewsletterCategory]')}
            # we use the node identifier as value, we could use "name" or "label" instead for example
            valuePropertyPath = 'identifier'
        }
    }

Root cause is the SelectOptionCollectionImplementation which tries to fetch value and label with ObjectAccess::getPropertyPath directly from the object, which is a node in this case.

In Neos <9 the Node object had all properties as members, but this has changed in Neos 9

@dlubitz dlubitz added the bug label Nov 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant