Bug with "Link to the Content" option on node_html_title view field

Created on 17 September 2025, 20 days ago

Problem/Motivation

In the NodeHtmlTitle.php such code exists:

if ($this->options['settings']['link_to_entity'] === TRUE) {

At first look, it's good and should work as expected because $this->options['settings']['link_to_entity'] can be only TRUE/FALSE. But there's a case when it can be 1 or 0, and it's very easy to reproduce.

Steps to reproduce

1. Create a view by node.
2. Configure the view to show fields.
3. "Content: Title" will be added automatically.
4. "Link to the Content" option for "Content: Title" field is already checked by default, and in the view, the preview content title is shown as a link to content.
5. Disable the option "Link to the Content" and save.
6. Enable it ( "Link to the Content") again and save.
In the view, the preview content title is not shown as a link to the content. (because after this option re-save $this->options['settings']['link_to_entity'] = 1)

Proposed resolution

Replace $this->options['settings']['link_to_entity'] === TRUE) with !empty($this->options['link_to_entity']) (based on code in the EntityLabel.php)

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡ΊπŸ‡¦Ukraine vitaliyb98

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Merge Requests

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024