Skip to content
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

Unable to modify Product Categories inside a product - MethodNotAllowedHttpException #20484

Open
nbarxma opened this issue Oct 22, 2024 · 1 comment

Comments

@nbarxma
Copy link

nbarxma commented Oct 22, 2024

I'm reporting a Bug :
When navigating into the Category section of a product that has Categories already assigned, there will always be a loading icon and
as a result categories are unable to get modified for a product once set.

Error message:
No route found for "GET https://myakeneo.com/enrich/product/list-categories/product/030c4ecb-f03e-46d9-b7e6-0d86de77674f/parent/4910": Method Not Allowed (Allow: POST)
MethodNotAllowedHttpException

image

📎 I'm using the Community Edition 📎

@nbarxma nbarxma changed the title Unabble to modify Product Categories inside a product - MethodNotAllowedHttpException Unable to modify Product Categories inside a product - MethodNotAllowedHttpException Oct 22, 2024
@Username070
Copy link

I will assume that you are using Akeneo version 7.x.

Judging by the error message, it looks like the request method is incorrect. You application is sending GET method, while POST is defined in the configuration: https://github.com/akeneo/pim-community-dev/blob/7.0/src/Akeneo/Pim/Enrichment/Bundle/Resources/config/routing/ui/product.yml

This endpoint configuration specifically:

pim_enrich_product_listcategories:
    path: /list-categories/product/{uuid}/parent/{categoryId}
    defaults: { _controller: pim_enrich.controller.product:listCategoriesAction, _format: json }
    requirements:
        uuid: '[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}'
        categoryId: \d+
    methods: [POST]

Make sure that your configuration is correct, and you're not overriding it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants