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

Error when not implementing position in entity storage #65

Closed
heimrich-hannot opened this issue Oct 30, 2024 · 4 comments · May be fixed by #66
Closed

Error when not implementing position in entity storage #65

heimrich-hannot opened this issue Oct 30, 2024 · 4 comments · May be fixed by #66

Comments

@heimrich-hannot
Copy link

I implemented an entity storage with group widget. I do not need the position, so I skipped implementing it.

I get following error:
image

My entity extends AbstractGroupElementEntity, where the comment above position stating Defining this field is optional.
But the ObjectAccessor return true for support and EntityStorage::getElementPosition() return null, since the value is null in my entity (seems to be filled with null by doctrine). Maybe there should be an additional check for the db field?

@m-vo
Copy link
Owner

m-vo commented Oct 30, 2024

Did you define 'order' => false in your group definition?

@m-vo
Copy link
Owner

m-vo commented Oct 30, 2024

Maybe either getElements() must not call getElementPosition() in that case or getElementPosition() should just allow null as a return value. 🤔

Could you check if the latter would solve the issue?

@koertho
Copy link
Contributor

koertho commented Nov 1, 2024

Did you define 'order' => false in your group definition?

Yes

Maybe either getElements() must not call getElementPosition() in that case or getElementPosition() should just allow null as a return value. 🤔

Could you check if the latter would solve the issue?

Seems to work.

@m-vo
Copy link
Owner

m-vo commented Nov 1, 2024

See #66

@m-vo m-vo closed this as completed Nov 1, 2024
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

Successfully merging a pull request may close this issue.

3 participants