Problem/Motivation
The "Segments" input text field is not always visible even if "Provide a static url segment as the prefix to the alias?" is checked.
Steps to reproduce
- Create a view
- Add a contextual filter
- Check "Specify validation criteria"
- Select the validator "Entity ID from URL path alias"
- Check "Provide a static url segment as the prefix to the alias?"
- The "Segments" input text field is not visible
Note that we have views where it works correctly and there are views where does not. It seems it depends on some settings, like the contextual filter type or the relationship.
In the code the following condition is used:
:input[name="options[argument_default][views_url_path][provide_static_segments]"]
In the inspector:
options[validate][options][views_url_path][provide_static_segments]
If I use this condition then displaying/hiding the by the checkbox works correctly for all the views.
Proposed resolution
Change the form states condition to work correctly in every case.
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | views_url_path_arguments-segments-input-text-field-is-not-visible-3339540-3.patch | 689 bytes | peter_serfozo |
| Screenshot from 2023-02-06 10-35-20.png | 30.24 KB | peter_serfozo |
Comments
Comment #2
peter_serfozo commentedComment #3
peter_serfozo commentedComment #4
peter_serfozo commentedComment #5
dxvargas commentedThe change fixes the issue in a good way and it's quite simple.
I mark it as RTBC.
Comment #6
heddnThanks for these contributions.