swag-docs-bundle-example icon indicating copy to clipboard operation
swag-docs-bundle-example copied to clipboard

Error when removing a product from a bundle

Open herrla opened this issue 6 years ago • 4 comments

When removing a product from a bundle via the product detail page in the administration there is an error when clicking on the save button. The Error says "An error occurred while saving the entity "....". and the Symfony toolbar shows a response code 404 of an ajax request. It seems like the delete route is called multiple times and is causing the error from the 2nd call onwards.

herrla avatar Dec 17 '19 10:12 herrla

hello @herrla is this issue still relevant? sorry for the delay :see_no_evil:

mitelg avatar Sep 14 '20 06:09 mitelg

@mitelg The error still exists. If you add a bundle on the product detail page it is immediately saved to the repository and the sw-entity-many-to-many-select does not show the changes. If you refresh the page after you chose a bundle you can see the changes.

If you click twice on the same bundle you can see the following error in the console: Uncaught (in promise) Error: Request failed with status code 404

{"errors":[{"status":"404","code":"FRAMEWORK__RESOURCE_NOT_FOUND","title":"Not Found","detail":"The bundle_product resource with the following primary key was not found: productId(43a23e0c03bf4ceabc6055a2185faa87) bundled(7e40a102647846d798b40cf2c1f51086) productVersionId(0fa91ce3e96a4bc2be4bd9ce752c3425)","meta":{"parameters":{"type":"bundle_product","primaryKey":{"productId":"43a23e0c03bf4ceabc6055a2185faa87","bundleId":"7e40a102647846d798b40cf2c1f51086","productVersionId":"0fa91ce3e96a4bc2be4bd9ce752c3425"},"primaryKeyString":"productId(43a23e0c03bf4ceabc6055a2185faa87) bundleId(7e40a102647846d798b40cf2c1f51086) productVersionId(0fa91ce3e96a4bc2be4bd9ce752c3425)"}}}]}

So the sw-entity-many-to-many-select does not work at all and the values should only be saved if you save the product and not immediately if you choose a bundle in the component...

grosssmutttr avatar Oct 18 '21 09:10 grosssmutttr

@mitelg is this still maintained or can we consider this as dead and never resolved? :-)

grosssmutttr avatar Nov 04 '21 16:11 grosssmutttr

@keulinho

mitelg avatar Nov 04 '21 19:11 mitelg