Fix 500 when saving /lists/add with URL parameters + fix global lists editing #8463
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Closes #8245 . Closes #8246 .
Fix. Saving from the /lists/add endpoint was erroring when used with url parameters to pre-populate the form. This was because these url parameters would be forwarded along with the POST request when the form was submitted (since the
action
was unset on the form). The endpoint now checks the request body independently/separately (by default,web.input()
combines data from both).Fix. Global lists (eg
/lists/OL1L
) were erroring when edited due to the?m=edit
→/edit
rewrite rule not triggering, causing the endpoint to be handled by infogami instead of our custom code. Fixed the rewrite rule.Fix. The
/edit
rewrite rule was erroring for users when a list had unicode characters in its url (see this users unfortunate list description!). Use thesafe_seeother
that performs url encoding.Technical
Testing
Tested locally:
Screenshot
Stakeholders
@davidscotson