As in the issue title - refers to all operator elements that are exposed.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

Graber created an issue. See original summary.

graber’s picture

Assigned: graber » Unassigned
Status: Needs work » Needs review
StatusFileSize
new2.15 KB

johnzzon made their first commit to this issue’s fork.

johnzzon’s picture

I created a merge request with the patch from #2 and also added a few null coalescing operators that fixes undefined index issues when $form_info was empty.

leon kessler’s picture

Status: Needs review » Reviewed & tested by the community

Tried out both the patch from #2 and the MR on gitlab.

When using the patch from #2, I get the following fatal error (when visiting the view page):

The website encountered an unexpected error. Please try again later.
TypeError: Argument 3 passed to Drupal\views_ef_fieldset\ViewsEFFieldsetData::moveFormElement() must be of the type array, null given, called in /var/www/html/docroot/modules/contrib/views_ef_fieldset/src/ViewsEFFieldsetData.php on line 180 in Drupal\views_ef_fieldset\ViewsEFFieldsetData->moveFormElement() (line 146 of modules/contrib/views_ef_fieldset/src/ViewsEFFieldsetData.php).

With the changes from the MR, everything works fine.

leon kessler’s picture

Status: Reviewed & tested by the community » Needs work

Just updating my site to Drupal 9, and having exposed operators breaks the layout pretty badly. I believe due to #2625136: Fix label visibility and add wrapper container for exposed numeric/date filters with multiple form elements.

We may have to exclude fields with exposed operators from being added to a fieldset, as Drupal core is now already doing this.

graber’s picture

@Leon, can you add some specific details why this needs work?

leon kessler’s picture

Here are some screenshots of before and after. This was taken on a fresh install via simplytest.me. Without the patch from this issue (so it could technically be a separate issue, but as this one is already dealing with exposed operators it makes sense to keep this in one place).

First is the filters placed into fieldsets, but without any exposed operators:
Exposed form without exposed operators

After exposing the operator on the content type field. You can see the layout breaks.
Exposed form with exposed operators

I updated the MR with a fix for this, see https://git.drupalcode.org/issue/views_ef_fieldset-3173822/-/commit/69dd...

This means that the change now supports both the old style and new style for exposed filters.

leon kessler’s picture

Status: Needs work » Needs review
graber’s picture

If I only remembered or had access to the specific project issue.. We'll see if someone will find this helpful so maybe the question will be answered again.

attisan’s picture

Fixed the problem and found this issue afterwards while creating an issue on my own. Discard it if it's not welcome.

attisan’s picture

fixed my broken patch 🙄

saccard’s picture

I can confirm that #13 works with dev version from 7 Oct 2021.
Tested it with a view with 36 exposed filters grouped in 6 field sets and 7 filters with exposed operators.
Thanks for the patch.

leon kessler’s picture

Please can people test the MR and not the patch from #13, since this has had more work on it, and is a collaborative effort.

FYI you can download a patch file from gitlab by appending .patch to the diff url.
I.e. https://git.drupalcode.org/project/views_ef_fieldset/-/merge_requests/1/...

saccard’s picture

@Leon: I tested the MR in #15 (Thanks for the hint with appending .patch to the diff url).
I can confirm that it works with my view described in #14. All exposed filters are working and are in the correct place. No errors or warnings in drupal's dblog. Everything looks fine.

vasike made their first commit to this issue’s fork.

davidwhthomas’s picture

The current MR version fixed the issue I was having where date filters with exposed operators were not grouped inside the fieldsets, with thanks.

eli-t’s picture

Status: Needs review » Needs work

Apologies - merge request now conflicts with HEAD of 8.x-1.x.

viniciusrp’s picture

I reworked the patch from merge-request to be compatible with new version.

eli-t’s picture

@viniciusrp can you please update the merge request instead of posting patches? That will run the CI.

r_cheh made their first commit to this issue’s fork.

r_cheh’s picture

Conflicts were fixed

eli-t credited pol.

eli-t’s picture

Status: Needs work » Reviewed & tested by the community

This looks good, moving to RTBC and adding credit

  • eli-t committed e95539e2 on 8.x-1.x authored by johnzzon
    Issue #3173822: Exposed operators are not included in fieldsets
    
eli-t’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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