Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
Now in \Drupal\Core\Entity\Plugin\EntityReferenceSelection\SelectionBase
the plural name for node and taxonomy term bundles are hardcoded.
Proposed resolution
Override that name in the descendant implementation and remove the hardcoding.
Remaining tasks
None.
User interface changes
None.
API changes
None.
Beta phase evaluation
Issue category | Task because the current code is not broken. |
---|---|
Prioritized changes | The main goal of this issue is to remove code fragility (unneeded hardcoding in a base class) in the selection plugins. |
Disruption | No disruption. |
Comment | File | Size | Author |
---|---|---|---|
#4 | remove_node_taxonomy-2452957-3.patch | 3.19 KB | claudiu.cristea |
#4 | interdiff.txt | 602 bytes | claudiu.cristea |
Comments
Comment #1
claudiu.cristeaPatch.
Comment #2
amateescu CreditAttribution: amateescu commentedSince we (still) don't have an easy way to get the plural label of an entity type (i.e. #1850080: Entity type labels lack plurality, cannot generate UI text based on label if plural is needed), I think we have to keep this hardcoding in ER selection handlers and it makes sense to do it in the specific selection handlers.
Also added a beta evaluation to the issue summary.
Comment #4
claudiu.cristeaOoops! :)
Comment #6
amateescu CreditAttribution: amateescu commentedYep, brain code-parser didn't spot that :/
Comment #9
webchickYikes. :\ Didn't realize we were exposing that confusing word in the UI anywhere, but I guess it's a pre-existing condition.
Anyway, this seems fine. It reduces fragility and doesn't break anything.
Committed and pushed to 8.0.x. Thanks!