Block page visibility paths are not validated, using path a without leading forward slash does not work

Created on 16 January 2017, almost 8 years ago
Updated 24 July 2023, over 1 year ago

Problem/Motivation

Block page visibility paths are not validated, using path a without leading forward slash does not work.

Steps to Reproduce

  • Install using standard install profile
  • Navigate to /admin/structure/block/manage/bartik_branding
  • Configure pages using 'user/login' path without leading forward slash and 'Show for the listed pages' option selected
  • Save form
  • Observer there is no validation error message.
  • Navigate to home page and observe no branding block rendered as expected
  • Navigate to /user/login path, observe no branding block rendered, unexpected (or expected?)

Proposed resolution

Use RequestPath::validateConfigurationForm to validate for required leading forward slashes.

Remaining tasks

Commit

User interface changes

Provides error message on block config form.

API changes

None

Data model changes

None

🐛 Bug report
Status

Fixed

Version

10.1

Component
Block 

Last updated about 14 hours ago

Created by

🇺🇸United States jasonawant New Orleans, USA

Live updates comments and jobs are added and updated live.
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