Problem/Motivation

The offcanvas component shows the error "ID field is not in the right format" using UI Patterns+layout builder and entering a custom ID.

Steps to reproduce

  • In layout builder, create a section using ui_patterns with the themes Offcanvas component
  • Enter a custom ID in the ID field
  • Click on 'add section'
  • Form does not save, and receive the error 'ID field is not in the right format.'

Proposed resolution

TBD

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

mengi created an issue. See original summary.

grimreaper’s picture

Title: Offcanvas component - Error when using custom ID » Validation error with identifier prop type
Project: UI Suite Bootstrap » UI Patterns (SDC in Drupal UI)
Version: 5.1.x-dev » 2.0.x-dev

Hi,

Thanks for the bug report.

I confirm that I can reproduce and that it is not related to UI Suite Bootstrap.

just_like_good_vibes’s picture

Assigned: Unassigned » just_like_good_vibes

i will take this

just_like_good_vibes’s picture

hello,
in fact this is a core bug about treating correctly unicode in pcre patterns.

the bad code is in FormElementBase, function validatePattern.

Our regex supports unicode, but drupal form and "#pattern" processing is not enough advanced to allow it.

i will submit a patch

pdureau’s picture

Maybe we can go easy with unicode PCRE patterns.

Ou regex will be less "good" but it may still be good enough and become compatible with Drupal's validatePattern function ?

just_like_good_vibes’s picture

don't worry, i already fixed

just_like_good_vibes’s picture

Assigned: just_like_good_vibes » pdureau
Status: Active » Needs review

pdureau’s picture

Assigned: pdureau » Unassigned
Status: Needs review » Fixed
grimreaper’s picture

grimreaper’s picture

Hi,

Thanks I confirm the bug fix.

pdureau’s picture

Title: Validation error with identifier prop type » [2.0.0-rc1) Validation error with identifier prop type
g4mbini’s picture

Title: [2.0.0-rc1) Validation error with identifier prop type » [2.0.0-rc1] Validation error with identifier prop type

Status: Fixed » Closed (fixed)

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