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

[Bug]: get-current-user error after update to 11.1.6 #16826

Closed
paulhaem opened this issue Mar 21, 2024 · 2 comments
Closed

[Bug]: get-current-user error after update to 11.1.6 #16826

paulhaem opened this issue Mar 21, 2024 · 2 comments
Assignees

Comments

@paulhaem
Copy link

paulhaem commented Mar 21, 2024

Pimcore version

11.1.6

Steps to reproduce

Using PHP 8.2.15.

After updating Pimcore from version 11.0.12 to 11.1.6 by following the instructions I am not able to use the Admin UI due to an error when retriving the current user.

The update process went through without any noticeable problems. Symfony, Pimcore and Browser Cache were cleared.

Actual Behavior

This error is returned from /admin/user/get-current-user after successful login:

Uncaught Error: Pimcore\Model\User\Permission\Definition::setCategory(): Argument #1 ($category) must be of type string, null given, called in /projectFolder/vendor/pimcore/pimcore/lib/Model/AbstractModel.php on line 186

Additionally the admin UI is not rendered properly, but this might be just a reaction to the user not being loaded correctly:
image

Expected Behavior

No error when retrieving the current user.

@kingjia90
Copy link
Contributor

kingjia90 commented Mar 21, 2024

Thank you for reporting!

Weird, there are no migrations related to that and no recent changes that would suggest this error.
I'd double-check if the table users_permission_definitions is still is not nullable and sets empty string as default, it seems coming from that.

@paulhaem
Copy link
Author

Thanks for looking into it! You were right, inside the users_permission_definitions table there was a single entry selectoptions with NULL instead of '' as the category. After updating the entry the admin UI worked again. Thanks a lot for the hint! ❤️

I then looked into the schema and saw that the category column allows NULL values and sets NULL as a default. Is it possible that this migration has been skipped somewhere in between?

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

No branches or pull requests

3 participants