UserName views argument validator doesn't transform path spaces or case

Created on 31 July 2023, 11 months ago
Updated 1 August 2023, 11 months ago

Problem/Motivation

The UserName views argument validator ignores the configured options for transforming spaces to hyphens and transforming the case in the path.

Steps to reproduce

  1. Add a user whose name contains a space and uppercase letters (e.g. "Drupal User").
  2. Configure a view that uses the username argument.
  3. Specify validation criteria using the User name validator.
  4. Set the "Case in path" option to lowercase (or any value other than none).
  5. In the "More" group, enable the "Transform spaces to dashes in URL" option
  6. Access the view with the argument supplied (e.g. "/path/to/view/drupal-user")

The value "drupal-user" will not validate and the action chosen under validation criteria will result. Note that either or both of items 4 and 5 will cause this behavior.

Proposed resolution

Check for the options "case in path" and "transform spaces to dashes in URL" and reverse those transformations before validating.

πŸ“Œ Task
Status

Active

Version

10.1 ✨

Component
ViewsΒ  β†’

Last updated 13 minutes ago

Created by

πŸ‡ΊπŸ‡ΈUnited States tmanhollan

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Production build 0.69.0 2024