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

  1. Create a view
  2. Add a contextual filter
  3. Check "Specify validation criteria"
  4. Select the validator "Entity ID from URL path alias"
  5. Check "Provide a static url segment as the prefix to the alias?"
  6. 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.

Comments

peter_serfozo created an issue. See original summary.

peter_serfozo’s picture

Assigned: peter_serfozo » Unassigned
Issue tags: -segment, -segments, -states, -prefix, -url, -alias, -config, -views, -checkbox, -validator
peter_serfozo’s picture

peter_serfozo’s picture

Status: Active » Needs review
dxvargas’s picture

Status: Needs review » Reviewed & tested by the community

The change fixes the issue in a good way and it's quite simple.
I mark it as RTBC.

heddn’s picture

Status: Reviewed & tested by the community » Fixed

Thanks for these contributions.

  • heddn committed c0f67db8 on 8.x-1.x authored by peter_serfozo
    Issue #3339540 by peter_serfozo, dxvargas, heddn: Segments input text...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.