Make WordPress Core

Opened 11 years ago

Closed 11 years ago

Last modified 11 years ago

#24982 closed enhancement (fixed)

Improve validation and error handling on install.php

Reported by: drewapicture's profile DrewAPicture Owned by: helen's profile helen
Milestone: 3.7 Priority: normal
Severity: normal Version:
Component: Text Changes Keywords: has-patch commit
Focuses: Cc:

Description (last modified by DrewAPicture)

As @nacin put in in 36:ticket:24078, install.php needs better poka-yoke — a Japanese term for 'mistake-proofing' — for error handling and validation, especially since 'admin' was removed as the default username in [24998].

Currently, displayed errors take the form of 'ERROR some error' which isn't great. That formatting needs improvement but it also seems like this might be a good opportunity introduce some in-line validation. Whether that be js with no-js fallbacks or what-have-you.

Attachments (3)

24982.diff (3.9 KB) - added by DrewAPicture 11 years ago.
24982.2.diff (2.2 KB) - added by helen 11 years ago.
24982.3.diff (2.2 KB) - added by helen 11 years ago.

Download all attachments as: .zip

Change History (10)

#1 @DrewAPicture
11 years ago

  • Description modified (diff)

#2 @dd32
11 years ago

See also #15729 for DB credential validation

@DrewAPicture
11 years ago

#3 @DrewAPicture
11 years ago

  • Component changed from General to Text Changes
  • Keywords has-patch added

24982.diff is a compromise of sorts.

  • It improves the wording of the errors so we can drop the 'ERROR' bit off the front
  • It also marks the Username and Email fields with an asterisk, e.g. required
  • And shuffles the fields so the two required Username and Email fields are grouped together

I think we should look at giving the install screen (and perhaps install.php itself) a facelift as part of the admin overhaul in 3.8. These small changes will be enough I think until we're ready to take more invasive steps to improve the experience.

#4 @ocean90
11 years ago

It also marks the Username and Email fields with an asterisk, e.g. required

For new users, that's not clear enough, since there is no explanation what the asterisk stands for. See comment_form() where we have sprintf( ' ' . __('Required fields are marked %s'), '<span class="required">*</span>' );.
Maybe we should also add aria-required="true".

The colors should match the one from div.error, so background-color: #ffebe8; and border-color: #c00;, and also lowercase, see codex.

Otherwise I'm fine with removing the ERROR prefix.

@helen
11 years ago

@helen
11 years ago

#5 @nacin
11 years ago

  • Keywords commit added; dev-feedback removed

Good with 24982.3.diff. Thank you for making .message pretty. :-)

#6 @helen
11 years ago

  • Owner set to helen
  • Resolution set to fixed
  • Status changed from new to closed

In 25620:

Better error messaging on install.php. props DrewAPicture, ocean90. fixes #24982.

#7 @nacin
11 years ago

In 25657:

End sentences in periods. see #24982.

Note: See TracTickets for help on using tickets.