WordPress.org

Make WordPress Core

Opened 3 years ago

Last modified 19 months ago

#30798 new enhancement

Ideas for improvements to to wp_die() usages

Reported by: johnjamesjacoby Owned by:
Milestone: Awaiting Review Priority: normal
Severity: normal Version:
Component: General Keywords: 2nd-opinion
Focuses: Cc:

Description

When a visitor to or a user of a WordPress powered site encounters a wp_die() message (traditionally handled by the _default_wp_die_handler() function) it is (likely intentionally) a very jarring experience. Having wp_die() produce human readable results is the least amount of assistance we could possibly provide when a not-completely-unanticipated event occurs, and I think in many instances we can provide a more positive experience.

Of our current 230 approximate usages, 33 appear to be Cheatin’; uh?'s which, while cute and full of personality, aren't particularly helpful to the innocent user who encounters them, nor are they stern enough to deflect any guilty parties from continuing to seek out unauthorized access.

The remaining 200 approximate usages typically drop an authorized user into a limbo state where their only option is going back in their browser history and hope their drafted content isn't bungled or lost. Maybe tucking some of these requests behind ajax actions would reduce that redirection? Or maybe enabling themes to have a template hierarchy for handling various error messages would be more user friendly?

I don't have a real improvement plan, and don't feel wholly qualified to solve this issue for the entire WordPress community, rather I'm hoping this ticket can foster some discussion about improving this trusted, though somewhat antiquated, piece of WordPress core.

Change History (5)

#1 @ericlewis
3 years ago

For Cheatin', uh? let's convene on #14530

#2 follow-up: @ericlewis
3 years ago

A lot of these could just use a review. E.g. The uploaded file is not a valid image. Please try again. could instead read The uploaded file has a type of of audio/mpeg, which is not a valid image. Please go back and upload an image. Ensuring the feedback users get is as explicit as possible would be a good first step.

#3 in reply to: ↑ 2 ; follow-up: @johnjamesjacoby
3 years ago

Replying to ericlewis:

A lot of these could just use a review. E.g. The uploaded file is not a valid image. Please try again. could instead read The uploaded file has a type of of audio/mpeg, which is not a valid image. Please go back and upload an image. Ensuring the feedback users get is as explicit as possible would be a good first step.

Sure, but my point is that for things like this (that could just as easily be a legitimate accident) a less severe UI would be a more friendly UX.

Last edited 3 years ago by johnjamesjacoby (previous) (diff)

#5 in reply to: ↑ 3 @ericlewis
19 months ago

Replying to johnjamesjacoby:

Sure, but my point is that for things like this (that could just as easily be a legitimate accident) a less severe UI would be a more friendly UX.

I agree, it'd be better to give user feedback as soon as they go down a wrong path (e.g. select a file) rather than after they click the submit button and go to another page.

What would you like to come out of this ticket? If there are specific user experiences we could improve I'm all for it. Perhaps we can break out separate tickets per issue?

Note: See TracTickets for help on using tickets.