Problem/Motivation

Default (exposed) filters are a special case we need to test, discuss and document!

We just came across a case where we have a view with an exposed "Country" filter for contacts. By default that filter is set to "Germany".

Testing this view, we saw an unexpected "nofollow" added on all pager links.

So we should probably add a test and if this is not a bug, a setting to ignore default exposed filters?

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

anybody created an issue.

anybody’s picture

Okay @grevil found it! Seems to be fine (still documenting and adding a dedicated test) makes sense.

The root cause was, that we tested in the views preview, which seems to add

_triggering_element_name
_triggering_element_value

to the URL, so we should also exclude these. @grevil will do that in the alpha release review task!

The behavior seems correct:

  • Changing the default exposed filter value adds a URL parameter, which then expectedly adds the nofollow
  • Selecting or keeping the default value for filters doesn't add a nofollow

@scott_euser what do you think how to best proceed here?

scott_euser’s picture

There should be an input field in the settings where you can ignore particular query strings. I suppose the field description could be more clear to explain that as a use case for it perhaps

scott_euser’s picture

Maybe grevil can check if there is a way of automating that rather than manually adding (eg based on view config defaults).

grevil’s picture

@scott_euser, so you would advise to not update the "core keys" to include:

_triggering_element_name
_triggering_element_value

?

IMO this would be the easiest and fastest fix. We could also adjust the defaults of "ignored_query_keys" to include:

_triggering_element_name
_triggering_element_value

by default.

I wouldn't automate aynthing based on view config defaults TBH.

grevil’s picture

Either way, even when minor let's implement it here and let #3623596: Alpha release stay seperate.

anybody’s picture

I think it's totally fine to add them to the core exclusions! Views is core, so I think that's fine (from my side).

@scott_euser should we somehow document the default (exposed) filter behaviour or add a dedicated test? (Or is there already one you created?)