- Issue created by @marco.aresu
- Assigned to Grevil
- 🇩🇪Germany Anybody Porta Westfalica
Thanks for the report @marco.aresu! @Grevil could you perhaps have a look and if it's not to complicated, write a test to proof and fix that?
- 🇩🇪Germany Anybody Porta Westfalica
PS: Perhaps this is a configuration issue if roles field is not set to unlimited but a single value?
- 🇩🇪Germany Grevil
Yes, the reason behind this is, as you correctly said, the single value option.
I don't really see a reason to NOT use cardinality unlimited ever. Should we simply not allow cardinality 1? Or is there only a hacky workaround to achieve this?
FYI: Not only is the standard value not not saved, but there is also an "N/A" entry for the checkboxes.
- 🇩🇪Germany Anybody Porta Westfalica
@Grevil: I don't think we can force this, so presumably we have to care for the case it's not unlimited and ensure it still works... might need a further
if
or so... - last update
over 1 year ago Composer require failure - @grevil opened merge request.
- Status changed to Needs review
over 1 year ago 1:16pm 25 May 2023 - 🇩🇪Germany Grevil
Fixed, please review!
Unfortunately, I couldn't fix the weird "N/A" bug when the field cardinality is set to 1. But I created a separate issue for that: 🐛 Field Cardinality set to "1" will add a "_none" role to the role id radios form element. Closed: works as designed .
- 🇩🇪Germany Anybody Porta Westfalica
Thanks @Grevil!
@marco.aresu does this fix the issue for you?
@Grevil: Did you consider the case, where a fixed cardinality of 1-10 is used? The last comment added implies something different, so I'm asking. Having unlimed vs. something else is good, I think, but we have to care it doesn't only work for 1 or unlimited, but also 2,3,4,...
I won't set this RTBC without testing it throughoutly, seems to touch dangerous parts of the code. Let's wait for further community feedback.
- Status changed to Needs work
over 1 year ago 1:59pm 25 May 2023 - 🇩🇪Germany Grevil
Ah sorry, I have not, good call! The logic needs to be reworked.
- last update
over 1 year ago Composer require failure - Status changed to Needs review
over 1 year ago 2:05pm 25 May 2023 - Status changed to Needs work
over 1 year ago 8:13am 26 May 2023 - last update
over 1 year ago Composer require failure - 🇩🇪Germany Grevil
Added tests, but they still fail, as the current implementation is still buggy.
- last update
over 1 year ago Composer require failure - 🇩🇪Germany Grevil
Done! We actually do not need to check the default Literal value. We just incorrectly received the "$items" values, thats all.
Added detailed tests and reworked the default value logic. Please review!
- Status changed to Needs review
over 1 year ago 8:23am 30 May 2023 - last update
over 1 year ago Composer require failure - last update
over 1 year ago Composer require failure - last update
over 1 year ago Composer require failure - last update
over 1 year ago Composer require failure - Status changed to RTBC
over 1 year ago 10:02am 30 May 2023 - 🇩🇪Germany Anybody Porta Westfalica
RTBC, thanks @Grevil. Composer still fails, but as of https://www.drupal.org/docs/develop/creating-modules/add-a-composerjson-... → the fix here should make it work for future MR's hopefully. Wondering, why it doesn't yet work here: https://git.drupalcode.org/project/entity_access_by_role_field/-/merge_r...
- last update
over 1 year ago Composer require failure - Issue was unassigned.
- Status changed to Fixed
over 1 year ago 10:03am 30 May 2023 Automatically closed - issue fixed for 2 weeks with no activity.