Project creation flow throws 404 when clicking 'save'
S4mmyb opened this issue · comments
Describe the bug
When using the project create flow (on production) a 404 error was produced when clicking save. This occurred when trying to use the UI to create a new project for the Grazing in Vineyard Systems (KSH01) Credit Class on the production application.
I was able to successfully initiate the project creation flow by clicking the "Create Project" button, then selecting the Credit Class, KSH-001. This took me to the first step in the project creation flow, Basic Info, which I was able to fill out. Upon clicking "save and next", however, I got a 404 error.
Interestingly enough, I tried to recreate the project and skipped clicking "save and next" and was able to fill out each step in the form by clicking the next button (arrow on the bottom left hand side of the form) which allowed me to make it all the way to the final page. When I got to the review details page nothing but the metadata was saved, but I was able to go back and re-fill out the form. When I did this the save and next button worked.
--
I've also noticed a 404 error thrown sometimes when I use the project edit form for existing projects. Most recently this occurred when I tried to update the project metadata. When I refreshed the page it ended up working, but I think it might be related.
For Admin Use
- Not duplicate issue
- Appropriate labels and zenhub epics applied
- Appropriate contributors tagged
Interestingly enough, I tried to recreate the project and skipped clicking "save and next" and was able to fill out each step in the form by clicking the next button (arrow on the bottom left hand side of the form) which allowed me to make it all the way to the final page. When I got to the review details page nothing but the metadata was saved, but I was able to go back and re-fill out the form. When I did this the save and next button worked.
This is expected, the next button doesn't save anything, it just goes to the next form in case you want to fill in those info in a different order than what the create flow expects.
Yeah I understand that, I just clicked the next button to try and get past the first page because every time I tried to click save and next I got a 404 so I still think this is worth looking into.
Hey team! Please add your planning poker estimate with Zenhub @blushi @flagrede @wgwz
Yeah I understand that, I just clicked the next button to try and get past the first page because every time I tried to click save and next I got a 404 so I still think this is worth looking into.
Yeah for sure, I have the feeling this might be related to some caching issue since the next button works (it just navigates to the next page whereas save and next submits/resets the cache). For the dev working on this, worth considering that some updates have been made to those flows recently that could actually solve this (#2060).
I had a quick look, and code-wise everything looks fine but a lot has changed since we made the last release.
It would we best to try to reproduce it after the next release.
I've been unable to reproduce this. We display a 404 page in the create/edit project flows if data has been (re)fetched and if there's no project found (either on chain or off chain now) so I'm not sure how this could happen as part of this use case... I guess this could happen if the project queries were not successful and returning null. And I'm wondering if the invalid csrf token issue could be involved with that (it's been seen recently too: #2085). I'd suggest to put this in the icebox and bring it back if it happens again at some point.
cc/ @ryanchristo
The fact that it was resolved by refreshing the page proves it was due to the invalid csrf token issue, which got fixed.