-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
New getter category-next/getCategoryFrom
and category-next/getCurrentCategory
always returns the root category
#3286
Comments
Okay, I think I found a solution and will open an PR later today for a more flexible integration :) |
I added a PR with some comments: #3295 |
cewald
referenced
this issue
in icmaa/vue-storefront
Jul 26, 2019
… module extension and implement it into our modules * @todo: remove module-extension when #3295 is approved and merged
cewald
referenced
this issue
in icmaa/vue-storefront
Jul 26, 2019
* Change `category-next/getCurrentCategory` as module extension and implement it into our modules * @todo: remove module-extension when #3295 is approved and merged
catalog-next/getCategoryFrom
and catalog-next/getCurrentCategory
always returns the root categorycategory-next/getCategoryFrom
and category-next/getCurrentCategory
always returns the root category
5 tasks
Great job @cewald, thanks for your input! :) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Current behavior
The new getter
category-next/getCategoryFrom
(andcategory-next/getCurrentCategory
) on the new category page always returns the root category because of a wrong filter in its getter.This happens if there is a category with a path like
/
or a empty one in thecategory-next/categoriesMap
state.E.g. if you are in
/boys.html
and the it crawls to the states it tests like:If there is a category with path
/
(or empty) in the state, it will always return this one. This filter is quiet flacky. I would prefer something more concrete like this:Also what happens if you use a different url path, then it would never find the right current category, e.g. I added an extra mapper fallback to let the
/new.html
category availaible ever/new
this won't over work with the new getters based on route path. You will need at least another getter for this at least.I think this new functionality leads a bit in the wrong direction and needs way more flexibility.
Expected behavior
Get the right category from state.
Steps to reproduce the issue
See above.
Repository
develop
Can you handle fixing this bug by yourself?
Which Release Cycle state this refers to? Info for developer.
Pick one option.
develop
branch and create Pull Request2. Feature / Improvement
back todevelop
.release
branch and create Pull Request3. Stabilisation fix
back torelease
.hotfix
ormaster
branch and create Pull Request4. Hotfix
back tohotfix
.Environment details
The text was updated successfully, but these errors were encountered: