-
Notifications
You must be signed in to change notification settings - Fork 516
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
CurrentRefinedValues widget bug? #1130
Comments
Hi, thanks for your question. Here's how you are using current refined values search.addWidget(
instantsearch.widgets.currentRefinedValues({
container: '#current-refined-values',
clearAll: false,
templates: {... },
onlyListedAttributes: true,
attributes: [{name: 'prijs', label: 'Prijs'}, {name: 'merkFull'}, {name: 'merkCat'},{name: 'carType'}, {name: 'loadIndexDisplay'}, {name: 'speedIndexDisplay'}, {name: '_tags'}, {name: 'aanbevolen', label: 'Aanbevolen door'}, {name: 'brandstofverbruik', label: 'Brandstofverbruik'}, {name: 'grip', label: 'Grip'}, {name: 'rolgeluid', label: 'Max. Rolgeluid (dB)'}]
})
); But Thanks |
I'm not sure if I understand you. MerkFull is a refinementList and works as expected (and can be cleared in the currentRefinements). We have set the urlsync option to true, so we want the show the same state when a user refreshes the page for example. When you now refresh the page you will get this error, but we want it to work exactly the same as it did without the refresh. Not sure if it's the currentRefinements that causes this.
|
Please can you open separate issues. |
@vvo Done |
@Maaark I am following this issue back, I cannot find the urls anymore. But nevermind, could you create a jsFiddle with the least amount of code needed to reproduce the error? That would help me. I understand that it means digging inside the error and almost solving it but I believe since you can reproduce it on your environement, with some try and console.log() and code commenting you should be able to generate a simple jsFiddle using your data or fake data so that we can really understand how to simply trigger this bug. Thanks. |
@vvo It might be better to share our test environment url with you. So you can see it in action. Can I share the url's with you per email? How can I reach you? |
I can download the codepen example and see the url bug. Just confirm me what are the steps to reproduce the behavior and what are you expecting instead. |
In the example, click on Michelin => url should change, refresh the page After the refresh the other brands arent shown anymore, even when you Is it clear what I mean? On Jul 25, 2016 10:54 AM, "Vincent Voyer" notifications@github.com wrote:
|
@Maaark We found the bug and will publish a new version tomorrow morning CET. Thanks A LOT for your patience and feedback |
In the meantime, to fix your issue, you can do this: searchRefinements1 = {maat: ['235 / 50 R18'],isZomerband: [1],}
searchRefinements2 = {maat: ['235 / 50 R18'],isZomerband: [1],} And then use facetsRefinements: window.searchRefinements1,
disjunctiveFacetsRefinements: window.searchRefinements2, (Same thing for facets and disjunctiveFacets options |
@vvo Great! I will apply it to our test environment in the afternoon, will let you know if it worked. |
<a name="1.7.0"></a> # [1.7.0](v1.6.4...v1.7.0) (2016-07-26) ### Bug Fixes * **searchParameters:** avoid mutating provided objects (#1148) ([0ea3bef](0ea3bef)), closes [#1130](#1130) ### Features * **toggle:** Provide a better default widget (#1146) ([d54107e](d54107e)), closes [#1096](#1096) [#919](#919)
When you visit [URL1] first and afterwards [URL2] the current refined values aren't shown anymore and the sort by widget has an issue as well.
I get this error in the console:
index.js:959Uncaught Error: merkFull is not defined in the facets attribute of the helper configuration
Which is true, I haven't defined it in searchParameters.facets, but when I do I can't select other values in this refinementList. Shouldn't the same code that gathers the values from the url define the facets in the helper or so? Or am I doing something wrong?
Both URL's are non public test sites. You can find the url's at http://codepen.io/Maaark123/pen/GqvBqb
The text was updated successfully, but these errors were encountered: