addon-grocy
addon-grocy copied to clipboard
Create product from Inventory screen, or change language, takes you to a 404 page
Problem/Motivation
When you create a product from the Inventory screen, it continues into a 404 page. Also, if you go to User Settings (at the :wrench: on the corner) and change the language, you're also redirected to a 404.
I think this happens somewhere else as well, but I can't remember right now the other screen.
Expected behavior
I tested this in the live Grocy demo and it takes you back to the Inventory page, as expected. I'm not sure if the problem is because in HA it runs on a subpath.
Actual behavior
It looks like a root path problem; the redirect in my instance goes to http://hass.local:8123/api/hassio_ingress/tBExf64mMbmSzXstfKLypj9J46CeBeoT1HMJZ-DIgX4//api/hassio_ingress/tBExf64mMbmSzXstfKLypj9J46CeBeoT1HMJZ-DIgX4/inventory?flow=InplaceNewProductWithName&&product-name=teste%202
(note the repeated /api/hassio_ingress
)
Steps to reproduce
- go to Inventory
- write a non-existing product on the first field
- press enter
- a popup shows up; select "add as new product"
- fill in any required fields on the "new product" screen
- press "save & continue"
- get sent to a 404 page
Proposed changes
I wonder if it's a problem of redirecting to a relative path (and thus, should be fixed in core Grocy), or related to the patches made in the add-on (as pointed by the veeery kind maintainer at https://github.com/grocy/grocy/issues/2379)
After stumbling upon Grocy's config file, I wonder if the initial patch from #157 couldn't be better handled by using either BASE_URL
, BASE_PATH
or even DISABLE_URL_REWRITING
...
Although those options seem to exist (2018, 2020) way before #157 (2021) and the mention of a "brain-damaged handling of relative URLs" seems to make sense lol
stale-proof comment
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
stale-proof comment
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
stale-proof comment
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
stale-proof comment
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!
stale-proof comment
There hasn't been any activity on this issue recently, so we clean up some of the older and inactive issues. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by leaving a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thanks!