- 🇩🇪Germany kle
My proposed solution was wrong... - workaround was adding the link via field-setting to /node/{nid} (something like that).
Real Solution:
If I set the field output PLAIN with Option "Link to content" this happens in
public function renderText($alter) { if ($this->options['settings']['link_to_entity'] === TRUE) { $alter['rendered']['#title']['#context']['value'] = $this->htmlTitleFilter->decodeToMarkup($alter['rendered']['#title']['#context']['value']); $this->last_render = $this->renderer->render($alter['rendered']); } else { $rendered = $this->renderer->render($alter['rendered']); $this->last_render = $this->htmlTitleFilter->decodeToMarkup($rendered); } return parent::renderText($alter); }
$this->options['settings']['link_to_entity']
has value 1 (not TRUE) so the else-part runs. Thats bad.
Just change === to ==
Its even more better to add some more check in line 51 - result is:
if ($this->options['settings']['link_to_entity'] == TRUE && is_array($alter["rendered"]["#title"])) {
- Assigned to indrapatil
- Status changed to Needs work
almost 2 years ago 5:15pm 10 March 2023 - Issue was unassigned.
- Status changed to Needs review
almost 2 years ago 5:17pm 10 March 2023 The last submitted patch, 6: 3229426.patch, failed testing. View results →
- Status changed to Needs work
9 months ago 8:12am 9 April 2024 - 🇺🇦Ukraine quadrexdev Lutsk
I did not reproduce this issue, "link_to_entity" is always of boolean type, not integer.
Please see the schema: https://git.drupalcode.org/project/drupal/-/blob/8.8.x/core/config/schem...
Looks like we need more info to understand/reproduce the problem (if still reproducible)