Developer forum

Forum » CMS - Standard features » Empty facets in FacetOptions Loop with Query Publisher

Empty facets in FacetOptions Loop with Query Publisher

Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

I am trying to use facets to filter some lists rendered with Query Publisher.

I have noticed that once I apply a Facet filter, the other Facet options are gone.

The behavior on the productCatalog seems to be different. I can still see the other FacetOptions.

Is this something by design or I am doing something wrong in my definition?

I am using 9.2.8.

Thank you,

Adrian


Replies

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hi Guys,

One more detail. If I select the correct binding between the facet and the Parameter, the list of Facet options is completely empty. However, if I select a wrong Parameter, the list is back and apparently it works correctly.

My guess is, something is wrong becasue of the new render options for facets. Or maybe it' just in my solution?

Thanks,
Adrian

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Anybody?

I have also found out that using a SQL Query with joins and aliases for the Index builder, breaks the "Field" selector on the index. Basically, the select field is empty.

Thanks,

Adrian

 
Steffen Kruse Hansen
Reply

Hi Adrian,

I have tbeen testing your problem, and I can see what you mean. The Query Publisher have a different default behavior, than the Product Catalog, where it always show empty facetOptions. In DW 9.2.8 there is no way to change this behavior, but I create a TFS item #31791, which should both change the default behavior (so it hides empty facetOptions by default) and also make it possible to configure this in the QueryPublisher settings.

This change should be fixed in 9.2.9

Best regards

Steffen

 

 
Adrian Ursu Dynamicweb Employee
Adrian Ursu
Reply

Hello Steffen,

I am afraidn I was misleading you. I want just the opposite. I need the FacetOptions loop to list all options regardless of the result count. This way I have a chance to decide if I want them to show or not.

Right now, the behavior is somehow correct but I thing there is a bug somewhere in the system.

If you pair the Facet correctly with the designated Parameter it is supposed to be bound, It will not render any option in the loop. If you bound the facet on a wrong Parameter, the behavior is the one I was expecting (see screenshot)

If want to test, please have a look at http://ttonline.dotfusion.ro repository Company. The repository is based on a SQL index and you can notice 2 things:

1. The New field dialog is not behaving correctly. The field select control is empty. Probably because of the aliases used in the SQL statement

2. In the company.facet  you will see that the "Sectiune" facet is connected to the "Tip" Parameter instead of the "Sectiune" Parameter. That was the only scenario that worked.

I hope I am making sense in my explanation.

Thanks,

Adrian

chrome_2017-03-31_11-54-43.png

 

You must be logged in to post in the forum