Belgium
Account created on 23 March 2009, about 16 years ago
#

Merge Requests

More

Recent comments

🇧🇪Belgium StryKaizer Belgium

Perfect. Thanks for reporting back!
Closing for now

🇧🇪Belgium StryKaizer Belgium

I can not reproduce this.

To test this I installed a vanilla 11.1.4 Drupal in ddev.
with composer, I installed 1.2 views_dependent_filters
Then I ran composer update drupal/views_dependent_filters -W, which updated to 1.3 as expected.

Can you please document how to reproduce this on a vanilla drupal environment?

🇧🇪Belgium StryKaizer Belgium

strykaizer changed the visibility of the branch 3512142-facets-3.x-support to hidden.

🇧🇪Belgium StryKaizer Belgium

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

🇧🇪Belgium StryKaizer Belgium

I just installed this module, and the mapping form works fine for me.

They are indeed empty on install. You'll need to create NotificationProviders defining getTypes, to see items overthere.

🇧🇪Belgium StryKaizer Belgium

This module is currently not working. You need the patch from 🐛 Module uses the wrong selector Active to fix it.

The steps from #2 seem correct, once you have it patched ;)

🇧🇪Belgium StryKaizer Belgium

Features are ready in MR.

Awaiting input for simplytest.me before merging, as it does not show Facets 3.0 as an option at this moment.

🇧🇪Belgium StryKaizer Belgium

Thanks,
I do wonder, why hardcode the options? Wouldnt it make more sense to just use a numberfield, which allows the user to pick whatever they prefer?

🇧🇪Belgium StryKaizer Belgium

Facets summary is not the recommended way anymore since Facets 3.x

For new projects using views + facets, using facets_exposed filters + views filters summary is the actual recommendation, which is documented in https://project.pages.drupalcode.org/facets/exposed_filters/#views-filte...

🇧🇪Belgium StryKaizer Belgium

Not sure.

That patch probably will break the current implementation anyway, as it looks like views_filters_summary expects following #id

'views-exposed-form-' . $this->view->id() . '-' . $this->view->current_display

. I'd probably just watch that issue, and once it gets committed, test and adjust :)

Maybe in the future, you'll need to use another selector instead of the exposed form id, (e.g. data-exposed-form-views-filter-summary="view_id__view_display"), which you add yourself in an hook_exposed_form_alter

🇧🇪Belgium StryKaizer Belgium

Sorry, I didnt respond to your question

"A reason for changing the selector format when querying the document?"

No, no reason for that, I don't even understand how that happened :)
Gonna blame Github Co-pilot for that. Ofcourse it should be the same as the context selector.

🇧🇪Belgium StryKaizer Belgium

At this moment, exposed form ids are not unique, if you render them in a block and place the block twice.
There's an open issue for that, see 🐛 Views hardcodes exposed filter block form ID's which breaks AJAX when the same form is shown multiple times on one page Needs review

However, your suggestion would work too, as getElementById always returns the first match, which would work fine.
I kept the context search, as I think its a bit cleaner to first scan in context only (less dom crawling, not sure if that gives performance boost though). But you can remove that if you prefer so.

🇧🇪Belgium StryKaizer Belgium

@mably sure

Render your exposed form as a block.

Click a filter

Try to remove the filter in the summary. (It will not work)

Pull request added.

🇧🇪Belgium StryKaizer Belgium

A big thanks for all your contributions, Daniel!

People like you are the reason we keep repeating the slogan "Come for the software, stay for the community".

🇧🇪Belgium StryKaizer Belgium

It looks like the best solution would be to have #2205027: VERSION in library declarations does not work for contributed/custom modules commited in core, so we can cache our assets as best as possible.

🇧🇪Belgium StryKaizer Belgium

Here you go.
Thx for reminding me Pedro!

🇧🇪Belgium StryKaizer Belgium

Not sure why you are not seeing the filter.

Can you try adding a regular filter (not facets), and expose it.
Does that one shows up?

In case you missed this, here is the documentation: https://project.pages.drupalcode.org/facets/exposed_filters/

🇧🇪Belgium StryKaizer Belgium

These processors are not supported in facets exposed filters.
This was fixed in 📌 Hide processors which are not supported in facets exposed filters Active

We need to build a views specific solution to support this. This will probably be a non-facets specific module, which will support all views exposed filters (similar to https://www.drupal.org/project/views_dependent_filters , which does something similar, but not exactly the same).

🇧🇪Belgium StryKaizer Belgium

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

🇧🇪Belgium StryKaizer Belgium

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

🇧🇪Belgium StryKaizer Belgium

@edmargomes can you please let me know which exact facets3 version you are using?

Since beta3, I dont think adding this function should matter anymore, and I was thinking about removing that part entirely.

🇧🇪Belgium StryKaizer Belgium

Limitting the options available is exactly what Facets does ;)

You can change the minimum value to 0, but it is probably better to not use facets in most cases, and use regular exposed filters, if you dont want your options to narrow down depending on the selection.

🇧🇪Belgium StryKaizer Belgium

strykaizer created an issue.

📌 | Facets | 3.x tests
🇧🇪Belgium StryKaizer Belgium

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

🇧🇪Belgium StryKaizer Belgium

Please open a new issue for this :)

🇧🇪Belgium StryKaizer Belgium

Correct, I encountered this myself when debugging date ranges.

Since query types are now supported since 🐛 Facets Exposed Filters - DateItemProcessor not working Active , the workaround can be deleted, as there's no issue anymore with solr.

🇧🇪Belgium StryKaizer Belgium

Core Views renders its "exposed form" before it fires the query.

Because how facets work, we only know the values after the query has been executed.
Thats why we re-render the exposed form again a second time.

That's why, if you are debugging, the first time you'll see an empty #options list, which is re-rendered the second time.

I dont have time to debug the select2 implementation, but this info could help somebody debugging it ;)

🇧🇪Belgium StryKaizer Belgium

For now, "facets exposed filters" uses hardcoded query_type_text.
We need to add querytype plugins support.

Attached is a patch which adds support for different querytypes (e.g. date & range)

This patch breaks showing active facet items with 0 results, as the facet results now act similar to how facet block facet results act.
We probably want to ensure active facet items with 0 items are always visible, both for the old "facet blocks" way, as for "facets exposed filters". This is even more important for "facets exposed filters", as we do not control the url ourself, and views wont remember non-existing elements.

🇧🇪Belgium StryKaizer Belgium

Fixed in 2.x and 3.x

🇧🇪Belgium StryKaizer Belgium

This has been reworked since beta3. There is no url processor anymore for exposed filters. It uses native views.

🇧🇪Belgium StryKaizer Belgium

Thanks,

I adjusted this a bit to use defineOptions instead, which allows us to set a default value globally, and I added 2 extra variables which also needed a default value.

🇧🇪Belgium StryKaizer Belgium

Ic, I assume you are placing your "exposed filters" in a block in that case?
Thanks for debugging, I'll fix this asap!

🇧🇪Belgium StryKaizer Belgium

While I dont mind committing the above, I'd rather find out why this value is null.
Anyone having this issue who could debug?

I can't reproduce this myself.

Does this happen on existing views + facets exposed filters only? Or also on newly created views + facets exposed filters?

🇧🇪Belgium StryKaizer Belgium

Hmm, interesting.
You would need to debug this in getActiveFacetValues() in modules/facets_exposed_filters/src/Plugin/views/filter/FacetsFilter.php

I wonder why this function returns NULL in your case.

🇧🇪Belgium StryKaizer Belgium

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

🇧🇪Belgium StryKaizer Belgium

I was able to reproduce this when ajax is enabled.

Attached is a quickfix.
Please let me know if this fixes your issue.

🇧🇪Belgium StryKaizer Belgium

@anybody: are you using 3.x-beta3?

Production build 0.71.5 2024