- Issue created by @saidatom
- Status changed to Needs review
11 months ago 7:25pm 22 January 2024 - Status changed to RTBC
11 months ago 7:27am 24 January 2024 - 🇬🇷Greece idimopoulos
For reference, this is reproducible only if the user does not have the access to delete the entity removed. In
web/modules/contrib/inline_entity_form/src/Plugin/Field/FieldWidget/InlineEntityFormComplex.php:914
there is a check alreadyif (!empty($entity_id) && $this->getSetting('removed_reference') === self::REMOVED_OPTIONAL && $entity->access('delete')) {
and the
delete
checkbox is not added if the user does not have 'delete' access. This, checking either for the access or if the array key exists is a valid case.
I don't know if tests are needed as this is a warning and a simple missing check that does not affect the end result. The user does not have access, the entity is also not marked for deletion. - Status changed to Needs work
10 months ago 7:11pm 28 January 2024 - 🇩🇪Germany geek-merlin Freiburg, Germany
Thx a lot, this makes a lot of sense.
But code is overly complex. Please use the more idiomatic
!empty($form_values['delete'])
- First commit to issue fork.
- Status changed to Needs review
10 months ago 6:27am 29 January 2024