Problem/Motivation
For a node view, a field reference with format `Link label to the referenced entity` will have null #title and fail on builder and preview islands:
"Drupal\Component\Utility\Html::escape(): Argument #1 ($text) must be of type string, null given, called in /var/www/html/web/core/lib/Drupal/Core/Utility/LinkGenerator.php on line 203"
When debugging we see #title of the link on the render array is null
Steps to reproduce
Create a node display, for example articles on profile standard:
- Add Field tags with config:
- Field: Tags
- Formatter: Label
- Check
Link label to the referenced entity
Uncheck `Link label to the referenced entity` and it's ok.
Debugging the render array, we have:
[
"#entity" => Drupal\taxonomy\Entity\Term
"#type" => "link"
"#title" => null
"#url" => Drupal\Core\Url
"#options" => [...]
"#cache" => [...]
]
Seems in UI Patterns ComponentElementBuilder::buildSource()
The getValue return the '#title' => null.
Proposed resolution
Remaining tasks
User interface changes
API changes
Data model changes
Comments
Comment #2
pdureau commentedComment #3
mogtofu33 commentedComment #4
mogtofu33 commentedComment #5
pdureau commentedIs it the same as #3607927: Link label to the referenced entity not saved done on UI Patterns side?
Comment #6
pdureau commentedLet's wait UI Patterns.
Comment #7
pdureau commentedUI Patterns 2.0.20 has been released.
I have tested today, I am not reproducing the issue anymore. Do you?
Comment #8
mogtofu33 commentedI confirm, tested and fixed within ui_patterns 2.0.20.