Views exposed filter input submit template does not apply

Created on 10 December 2021, about 3 years ago
Updated 31 January 2023, almost 2 years ago

Having come across an issue where a suggested template is not being applied, I found https://www.drupal.org/project/twigsuggest/issues/3166679 β†’ .

While this goes some of the way to tackling this issue, it does not fix the issue with the input template.

I have

<!-- FILE NAME SUGGESTIONS:
   * input--submit.html.twig
   x input--edit-submit-customer-stories.html.twig
   * input.html.twig
-->

being suggested, however the middle of those 3 is not being applied unless I amend the .module file.

In order for this to be fixed, the twigsuggest_theme_suggestions_input() function needs amending to also include the str_replace change made in the above mentioned issue, which allows the template to be picked up (as shown by the x above).

If no one picks this up in the next few days I'll drop a patch, however don't have time to right this second.

To reproduce:

1. Create a view with exposed filters - the apply button should have a similar list of template suggestions as above
2. Create a template with the name of the middle suggestion and amend it from the original for test purposes
3. Clear caches and reload your page - the suggested template should not load - you could try and implement the input--submit template to see it working if you want, as this one does load.

πŸ› Bug report
Status

Fixed

Version

1.0

Component

Code

Created by

πŸ‡¬πŸ‡§United Kingdom kiwimind

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024