The required link text does not work properly

Created on 31 January 2022, over 2 years ago
Updated 29 May 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

Postponed: needs info

Version

11.0 ๐Ÿ”ฅ

Component
Linkย  โ†’

Last updated 3 days ago

Created by

๐Ÿ‡ฎ๐Ÿ‡นItaly robertoperuzzo ๐Ÿ‡ฎ๐Ÿ‡น Tezze sul Brenta, VI

Live updates comments and jobs are added and updated live.
  • Needs issue summary update

    Issue summaries save everyone time if they are kept up-to-date. See Update issue summary task instructions.

Sign in to follow issues

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