- last update
about 1 year ago 8 pass - π§πͺBelgium falc0
Going further on the patch in #4:
Views_bulk_operations expects $result['message'] to be a MarkupInterface. I changed the patch for this and added the type "error" so the messages get the correct status.
- last update
10 months ago 8 pass - π§πͺBelgium rp7
Expanded the patch to limit validation errors to only the ones that the user is able to edit, consistent with content entity forms (https://git.drupalcode.org/project/drupal/-/blob/11.x/core/lib/Drupal/Core/Entity/ContentEntityForm.php?ref_type=heads#L212)
- last update
10 months ago 8 pass - π§πͺBelgium rp7
A small improvement in that the field label is nog also mentioned in the error message, which makes it easier for the user to know which field is causing the error message. As mentioned before, the error reporting is still very much barebones and I expect the work done in #1327632: Support action specific status message reporting. β could help us here.
- π©πͺGermany Anybody Porta Westfalica
@rp7 could you turn this into a MR?
Furthermore I' unsure if it should't allow to opt-out. Perhaps adding a setting "Validate entity" which is prechecked, could make sense?
- Status changed to Needs work
3 months ago 8:06am 2 September 2024 - First commit to issue fork.
- πΊπ¦Ukraine sickness29
Implemented the validate method that does the validation for the entity before submit to be able to set errors to bulk form fields. Previous patch just avoided errors and there was no validation errors shown to user.
Also added a test case that checks node save with empty title as right now it results in WSOD.Hi @anybody,
I don't see point in disabling entity validation.
What the test you imagine for it would be? i.e. if enabled - we have proper validation errors on form and if disabled - WSOD?
Right now I feel like it's important step in saving entity that is being missed, which is a bug that may result in WSOD in certain scenarios - πΊπΈUnited States majorrobot
#14 worked for my case. We have a multi-value field that allows a maximum of 2 values. Previously, you could add as many values as you want -- the values would not save, nor would an error be thrown.
After applying a patch from #14, user gets an error when >2 values are chosen.
- π©πͺGermany Anybody Porta Westfalica
MR has a merge conflict that needs to be resolved.
Furthermore, as this is a complex change, needs community review.
- πΊπ¦Ukraine sickness29
@anybody fixed merge conflict, please have a look.
sure, I understand your concerns. anything I can do to help this process?