#30361 closed task (blessed) (fixed)
Correctly handle DB queries failing
| Reported by: | pento | Owned by: | pento |
|---|---|---|---|
| Priority: | high | Milestone: | 4.2 |
| Component: | General | Version: | |
| Severity: | normal | Keywords: | |
| Cc: | Focuses: | ui, administration |
Description
Nearly all “Save”-type actions in wp-admin don’t react correctly when the DB query fails - they show a success message, without confirming that the save occurred.
All screens and forms need to be audited for correct behaviour. If there’s a screen you want to grab, please comment in this ticket, then upload a patch when you're done.
Change History (8)
#2
@
12 years ago
What would be the "saving has failed" message and what action can we offer to the users so they can fix/try again?
Something like: "Saving failed as the text you've entered contains invalid characters. Please remove them and try again." won't make much sense unless we can somehow show/highlight the invalid chars. Not sure if that is even possible, if they are emoji on a Mac, they would look proper to the users.
#3
@
12 years ago
That's a pretty good point, we're better off removing the characters, so that users aren't required to dig through their changes to find the "invalid character".
I shall experiment a bit, and see what I come up with.
![(please configure the [header_logo] section in trac.ini)](/chrome/site/your_project_logo.png)
[30346] is how the post edit screen sanitizes data if the query fails, though it doesn't warn the user if the query fails a second time.