Skip to content

Different filter object in SSR or client side #4045

@simonmaass

Description

@simonmaass

Current behavior

When loading category with filter on SSR i get the following object:
e.g.: http://localhost:3000/shop?manufacturer=736&price=0.0-50.0
{ "manufacturer": { "id": "736", "label": "Bauerfeind", "type": "manufacturer", "attribute_code": "manufacturer" }, "price": { "id": "0.0-50.0", "type": "price", "from": 0, "to": 50, "label": "< €50", "single": true, "attribute_code": "price" } }

When loading the same filter from client the object is an array:
{ "price": [ { "id": "0.0-50.0", "type": "price", "from": 0, "to": 50, "label": "< €50", "single": true, "attribute_code": "price" } ], "manufacturer": [ { "id": "736", "label": "Bauerfeind", "type": "manufacturer", "attribute_code": "manufacturer" } ] }

Expected behavior

Should both be the same

Steps to reproduce the issue

Load a category with param in url e.g. ?price=0.0-50.0 and also try to select it on client in frontend... objects are different from 'category-next/getCurrentFilters'

Repository

v.1.11

Can you handle fixing this bug by yourself?

  • YES
  • [x ] NO

Which Release Cycle state this refers to? Info for developer.

Pick one option.

  • This is a bug report for test version on https://test.storefrontcloud.io - In this case Developer should create branch from develop branch and create Pull Request 2. Feature / Improvement back to develop.
  • This is a bug report for current Release Candidate version on https://next.storefrontcloud.io - In this case Developer should create branch from release branch and create Pull Request 3. Stabilisation fix back to release.
  • This is a bug report for current Stable version on https://demo.storefrontcloud.io and should be placed in next stable version hotfix - In this case Developer should create branch from hotfix or master branch and create Pull Request 4. Hotfix back to hotfix.

Environment details

  • Browser: Chrome
  • OS: Windows 10
  • Node: v10
  • Code Version: v1.11

Additional information

Metadata

Metadata

Assignees

Labels

P3: NormalPriority mark - normal prioritybugBug reports

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions