getgrav / grav-plugin-login

Grav Login Plugin
http://getgrav.org
MIT License
44 stars 54 forks source link

Validation fails on user `content_editor` field editor set but disabled #278

Closed rhukster closed 2 years ago

rhukster commented 3 years ago

Edge case, but ran into this while testing nextgen-editor. I had an overridden content_editor setting in my user set to nextgen-editor, but then disabled the plugin. I then got a blueprint validation failure because the valid 'options' for this field as defined by the blueprint are provided by a function that has an event that allows nextgen to add itself to the list. With the plugin disabled it can't add itself, so is not available, you get the idea.

We can discuss offline for solutions, but wanted to create a ticket to keep track of it.

mahagr commented 3 years ago

Needs also flex users enabled in system configuration, as well as session_user_sync in login, turned on.

mahagr commented 3 years ago

The error happens because $object->update() is meant to be used for user input and has validation. Though that said, there is no alternative method to bulk update fields without having a check...