Problem/Motivation

When we enter an invalid URL, all the fields border color change to red

Steps to reproduce

Set a Link type field to use widget "Link (with Attributes)".

Go to add/edit page for the respective content type (or any entity type) and set a wrong URL respective to the format (htts://www.google.com)

Proposed resolution

Change the validation system, put in error only the url part and not all the fields of the link.

Issue fork drupal-3294933

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jamaoui created an issue. See original summary.

immaculatexavier made their first commit to this issue’s fork.

cilefen’s picture

Version: 9.0.x-dev » 9.4.x-dev
Category: Feature request » Bug report
Issue tags: -link, -field validation, -field widget

This looks like a bug report.

Version: 9.4.x-dev » 9.5.x-dev

Drupal 9.4.9 was released on December 7, 2022 and is the final full bugfix release for the Drupal 9.4.x series. Drupal 9.4.x will not receive any further development aside from security fixes. Drupal 9 bug reports should be targeted for the 9.5.x-dev branch from now on, and new development or disruptive changes should be targeted for the 10.1.x-dev branch. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

enaznin’s picture

Assigned: Unassigned » enaznin
enaznin’s picture

Version: 9.5.x-dev » 10.1.x-dev

enaznin’s picture

Status: Active » Needs review
smustgrave’s picture

Status: Needs review » Needs work
Issue tags: +Needs Review Queue Initiative, +Needs tests, +Needs screenshots

This issue is being reviewed by the kind folks in Slack, #needs-review-queue-initiative. We are working to keep the size of Needs Review queue [2700+ issues] to around 400 (1 month or less), following Review a patch or merge request as a guide.

As a bug this will need a test case.

Since it's changing the UI before/after screenshots should be added to the issue summary after the final patch.

enaznin’s picture

StatusFileSize
new413.95 KB

Added after screenshot

VladimirAus made their first commit to this issue’s fork.

carolpettirossi’s picture

I'm trying to review this issue and help with tests. However, the Issue summary is not complete.
I couldn't find the widget "Link (with Attributes)" in the Manage Form Display tab.

@enaznin, can you please update the Issue Summary adding more details about field type, field widget, and modules that must be enabled?

Thanks :)

Version: 10.1.x-dev » 11.x-dev

Drupal core is moving towards using a “main” branch. As an interim step, a new 11.x branch has been opened, as Drupal.org infrastructure cannot currently fully support a branch named main. New developments and disruptive changes should now be targeted for the 11.x branch, which currently accepts only minor-version allowed changes. For more information, see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

dcam’s picture

Assigned: enaznin » Unassigned
Status: Needs work » Active

As mentioned in #12, there is no Link (with Attributes) widget in Drupal Core. That belongs to the Link Attributes widget module. I'm moving this issue to that queue.

dcam’s picture

Project: Drupal core » Link Attributes widget
Version: 11.x-dev » 2.x-dev
Component: link.module » Code
Issue tags: -Needs Review Queue Initiative

Attempt 2 to change the project.