Validate the redirect URL only when "Enable URL redirect" is selected

Created on 12 June 2024, 5 months ago
Updated 2 July 2024, 5 months ago

To understand what this issue suggests should be changed, follow these steps:

  • On /admin/config/development/maintenance, select Enable URL redirect
  • Enter a value like https://example.org in the Redirect URL field
  • Click on the Save configuration button
  • The form will show a message (The configuration options have been saved.)
  • Change the value entered for the Redirect URL field to a not valid URL (for example :::::wwwwhttps://example.org)
  • Unselect Enable URL redirect
  • Click again on the Save configuration button
  • This time, the form will show an error message (The entered URL is not valid.), but the form element containing the wrong value is not visible

Since the Redirect URL field is only visible when Enable URL redirect has been selected, the first should only be validated when the latter has been selected. Differently, the validation error would be shown when the relative form element is not visible.

📌 Task
Status

Fixed

Version

1.0

Component

Code

Created by

🇮🇹Italy apaderno Brescia, 🇮🇹

Live updates comments and jobs are added and updated live.
  • Needs backport to D7

    After being applied to the 8.x branch, it should be considered for backport to the 7.x branch. Note: This tag should generally remain even after the backport has been written, approved, and committed.

Sign in to follow issues

Merge Requests

Comments & Activities

Production build 0.71.5 2024