- Issue created by @mlncn
- First commit to issue fork.
- π΅πΉPortugal lolgm
The MR !7 introduces a new configuration option for the Read only widget, allowing users to decide whether required field validation should be enforced.
To preserve backward compatibility with the current module behavior, this option defaults to
FALSE
.At the moment, this MR does not include tests for the new functionality, as the existing tests are currently failing. From what I can tell, the failures seem related to recent changes in Drupal core, and not caused by this patch.
Iβve confirmed locally that the tests fail on Core 11, but pass on Core 10.
Can someone confirm whether these failures also occur on the latest Core 11 version without this MR applied?
- π¦πΊAustralia thtas
Oh dear yes the tests are indeed broken. I've created a new 2.x dev branch and will try and make things green again.
re: this issue
Yes it seems ok to me.
What sort of scenario would you need this option for?
- π΅πΉPortugal lolgm
Thank you for the feedback, @thtas.
My use case involves:
- Two content types: A and B.
- A required entity reference field on node type B, pointing to a node type A, using the Read only widget.
- The reference is auto-populated via query parameters when accessing the form at /node/add/b, using the Entity Prepopulate (epp) module.
In this scenario, I need the required field validation to be enforced, because it's critical that the reference to the related node is always present when creating content of type B.
Without validation, users could create content without the necessary reference β for example, by editing or removing the query parameter β which would break data integrity in my case.
- π΅πΉPortugal lolgm
@thtas Thank you for your follow-up. Would it be possible to also include me in the issue credits?
Automatically closed - issue fixed for 2 weeks with no activity.