The required link text does not work properly

Created on 31 January 2022, almost 3 years ago
Updated 26 April 2023, over 1 year ago

Problem/Motivation

In my custom paragraph type, I select "Required" in "Allow link text"

but in edit form the field is still "not required"

Steps to reproduce

  1. Install the Paragraphs module
  2. Create a paragraph type [my_paragraph] and add a link field selecting "Required" in "Allow link text" options
  3. Add an entity reference review field to an existing content type [my_content] to reference the paragraph type
  4. Create a node of [my_content]

Proposed resolution

In LinkWidget class at row 239 there is '#required' => $this->getFieldSetting('title') === DRUPAL_REQUIRED && $element['#required'],

The result of condition $this->getFieldSetting('title') === DRUPAL_REQUIRED is FALSE

We can use the operator == or cast the compared items.

🐛 Bug report
Status

Active

Version

9.5

Component
Link 

Last updated about 22 hours ago

Created by

🇮🇹Italy robertoperuzzo 🇮🇹 Tezze sul Brenta, VI

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