Error shows up when I enter path starting with "/" (the domain before field ends up with "/") so it's like creating not valid url. Then you try to fix it by removing "/".
Steps to replicate it:
- in 'redirect' click 'add redirect'
- in the 'Path' field add sth like this "/test-test/test"
- in the 'To' field add any page
- click 'save'
- there should be error message about slash in url
- remove first slash in url
- try to save redirect again
there should be error message 'Path field is required'

Comments

polszanski created an issue. See original summary.

wim leers’s picture

Status: Active » Closed (works as designed)

In Drupal 8, paths now follow the HTTP spec, which means they now do have a leading slash. Therefore this is working as expected!

Thanks for taking the time to report this though ❤️

berdir’s picture

Status: Closed (works as designed) » Postponed (maintainer needs more info)

Not so fast. The redirect source field actually doesn't require a leading /, which I know is inconsistent but tricky to change. This existed before core changed url fields to have a leading / and while the to-field behavior was forced on us, the from field is a custom field.

I'm not sure I understand what exactly you did try to do and what the expected result it, but better validation on that might make sense.