Problem/Motivation

On a fresh Drupal install, menu link description supports entering <nolink> and <button>.

Start typing the title of a piece of content to select it. You can also enter an internal path such as /node/add or an external URL such as https://example.com. Enter <front> to link to the front page. Enter <nolink> to display link text only. Enter <button> to display keyboard-accessible link text only.

The fix in #3365954: Firefox error with link validation regex patterns fixes a jQuery issue which allows the validation to work but also fails to account for these valid placeholders.

Steps to reproduce

1. Install a new site with clientside_validation enabled.
2. Go to add a link to a menu.
3. Enter a Menu link title and a Link entry of <nolink>
4. Observe the HTML validation error "Please match the requested format."

Proposed resolution

Add <nolink> and <button> to the clientside_validation regex.

CommentFileSizeAuthor
#10 28.patch1.31 KBzeeshan_khan
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

j_s created an issue. See original summary.

j_s’s picture

Title: <nolink>, <button> and <front> get validation errors in menus » <nolink> and <button> get validation errors in menus
Issue summary: View changes

shivam_tiwari’s picture

@j_s I checked following issue but I am not getting this. I checked on Drupal 11.0.12 and Clientside Validation 4.1.2.

j_s’s picture

I tested it right now on simplytest.me using Drupal 11.1.2 and Clientside Validation 4.1.2 and cannot add a menu link with the nolink type. In Chrome and Edge, I get the error described. In Firefox, I don't see the error, but it has the same result of me not being able to actually save the link.

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

nikunjkotecha’s picture

Status: Active » Fixed

  • nikunjkotecha committed 8a2083ef on 4.0.x authored by j_s
    Issue #3507911 by j_s, shivam_tiwari: <nolink> and <button> get...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

zeeshan_khan’s picture

StatusFileSize
new1.31 KB

This issue is not yet fixed I think the code is not yet merged I am facing the same issue in Drupal 11
When I checked the module code I didn't find the fixed code.