codingdavinci / relaunch2018

This is the new Coding da Vinci website (online since September 2020).
https://codingdavinci.de
GNU General Public License v2.0
1 stars 1 forks source link

Update Better Exposed Filters module #242

Closed Snater closed 3 years ago

Snater commented 4 years ago

Version 3.x of the Better Exposed Filters modules is not supported anymore. A patch had to be installed per composer for version 3.x to allow toggling filter links. It needs to be checked if the newer version would also require a patch and of course that no things break.

lucyWMDE commented 4 years ago

thanks. Do you need testing support from me? Not sure what I'd be testing. Playing around with the filters for projects and datasets everything seems to work fine from a user perspective.

Snater commented 4 years ago

(The module needs to be updated to a new major version because the 3.x is not supported anymore. As far as I can see, the update only impacts the setup of the dataset view (dataset overview page). But the module is also invoked on the project overview page.)

Installing this update requires adjusting the "Datensätze" view—I can do when I have permissions to access the test deployment and the update was pulled. Otherwise someone else has to take action:

  1. Go to "Datensätze" view
  2. Right column: "HERVORGEHOBENES FORMULAR", click "Better Exposed Filters" and reset to "Basis", then "Anwenden (diese Anzeige)"
  3. Click "Basis" which was "Better Exposed Filters" before and change back to "Better Exposed Filters", then "Anwenden (diese Anzeige")
  4. Click "Einstellungen" next to "Better Exposed Filters" which opens a dialog.
  5. Set the filter widget of the following exposed filters to "Links": THEME, EVENT, OBJECT_TYPE, LINKS.
  6. Click "Anwenden" to close the dialog and then "Speichern"
lucyWMDE commented 4 years ago

I worked through your steps. At step 5, there's no exposed filter "Links". I have set "Theme", "Event" and "Object_type" to Links. The remaining 3 are "search", "institution", "license". I'm taking a guess that you meant "License" rather than "Links" and have set that to Links also.

lucyWMDE commented 4 years ago

Problem is now that we've lost the collapsible-ness of the Objekttyp filter - both parent and child categories are automatically displayed. We should only be able to see parent categories. Sub-categories should only be revealed when their parent category is selected.

Snater commented 4 years ago

That should do it once deployed. The major version upgrade involved some changes to the templates.

However, I discovered that there is a bug in the Better Exposed Filters 3.x release. When switching a filter off while, it will reset the whole filter. For example, click "Text", then "Bild", then "Bild" again. Result: "Text" will also be reset. There is an issue ticket (https://www.drupal.org/project/better_exposed_filters/issues/2897367), but we cannot just consume the attached patch, because for our use case, we need an additional string conversion since the option values for the object type are integer ids of taxonomy terms. So I'd need to push a patch onto drupal.org first.

lucyWMDE commented 4 years ago

Hmm.. The sub-categories now only appear after selection of a parent category, which is good, but something has gone wrong with the link styles... They should work as they still do on your old server: http://codingdavinci.snater.com/de/daten

Snater commented 4 years ago

Seems to work locally, not sure why it's not reflected on the test deployment… should be deployed automatically by now, cleared caches. Maybe takes some more time.

lucyWMDE commented 4 years ago

Sorry - not sure which issue this filter tag link styles problem really belongs to. I commented it on this ticket https://github.com/codingdavinci/relaunch2018/issues/196#issuecomment-692098445 - not resolved yet. I'll check back over the course of the week.

Snater commented 4 years ago

Filter styles seem to be correct on the test deployment now.

lucyWMDE commented 4 years ago

Good, but. Now we've lost the child categories under the Objekttyp filter 😭 It doesn't propose the option "nested links" under Struktur/Ansichten/Datensätze/Erweiters/Hervorgehobenes Formular/Better Exposed Filters/Einstellungen/Exposed Filter Settings/Objekttyp

Snater commented 4 years ago

Sorry, I might just have forgotten to actually click a link in the end. Should work now. (Nested links are not a dedicated option in BEF 3.x anymore, it's just detected kind of automatically, so config is fine.)

lucyWMDE commented 4 years ago

still not fixed over here.. child categories still missing :/ Maybe something went wrong with the implementation?