- Merge request !2761Issue #2796341: Entity reference field View output is not used for selected entity display β (Open) created by GuyPaddock
- π«π·France dqd London | N.Y.C | Paris | Hamburg | Berlin
I see all the points and worries but to get forward with this issue and its main focus and primary scope we should prevent to disperse discussion about corners of likes and dislikes in the solution and should minimize the scope as much as possible.
It is important for custom entities, for big contrib projects like ECK and paragraphs and any data which do not have mandatory title (label) field (and also for the long term future in core since there are discussions about to change the mandatory title field for nodes too) that we get the option at hand to show other than the title field in the edit form after a reference has been selected. -- And from what I understood this issue would solve it.
Can somebody who is more into this issue, update the summary and can make some notes about what to do next to get forward so that others can chime in to help? Since this issue is a little bit dated it surely needs updates on the to-do list.
- π«π·France dqd London | N.Y.C | Paris | Hamburg | Berlin
More investigating and maybe "good to know" information: For those who use inline_entity_form for creating new entities in the progress of adding them as references can use ief_table_view_mode to get a custom preview of the reference in the edit form display. This solves the problem of entities which have no "label" (title) field looking like empty entries in the preview. Thanks to @mnico for this contribution and important extension for the IEF workflow.
- Assigned to GuyPaddock
- πΊπΈUnited States GuyPaddock
I reviewed the MR feedback (thank you, @ameymudras). I've ticketed π Replace \Drupal calls with proper IoC in form elements Active under the #2729597: [meta] Replace \Drupal with injected services where appropriate in core β meta issue. That issue should be appropriately scoped to rework form elements like the Entity Auto-complete text field to use DI. I am moving both
\Drupal::service('plugin.manager.entity_reference_selection')
calls in the class into a utility method and adding a todo that references #3423053. I believe that to be the most prudent way to avoid bloating the scope of this issue.Regarding your feedback, @liquidcms, I agree with what I believe @dqd is saying -- the scope of this issue is to fix what value appears in the autocomplete field when a view is being used to drive selections. The question of whether an ID should be suffixed or not is outside the scope of this issue. The issue you are looking for is π UX: Hide entity ID in autocomplete widget Needs work and until that issue lands, the implementation in this ticket is consistent with both the way that the ID appears during initial selection with a view as well as autocomplete fields that are not driven by a view.
As for your other question, @dqd, it seems like you found a solution to your problem with IEF. Regardless, I have cleaned up the issue description to clarify that this issue is specific to autocomplete text fields. Please let me know if that addresses your issue, since IEF is completely separate.
- Status changed to Needs review
9 months ago 10:41pm 21 February 2024 - πΊπΈUnited States GuyPaddock
Just updated the branch for 9.5. My next update will update this for 10.1.x.
- Issue was unassigned.
- Status changed to Needs work
9 months ago 4:53pm 22 February 2024 - πΊπΈUnited States smustgrave
Issue summary appears to be missing a few sections
Added the missing sections but left TBD on sections for someone more familiar with the issue to speak on.
Also can we hide some of the MRs to just have the intended for 11.x branch. Can be backported later depending when this lands.