[wp-trac] [WordPress Trac] #43003: HTML5 "required" attribute in Widget form() fails in ajax-actions.php during save

WordPress Trac noreply at wordpress.org
Thu Jan 11 18:48:55 UTC 2018


#43003: HTML5 "required" attribute in Widget form() fails in ajax-actions.php
during save
-------------------------------+--------------------
 Reporter:  Andy Schmidt       |       Owner:
     Type:  defect (bug)       |      Status:  new
 Priority:  normal             |   Milestone:  4.9.2
Component:  Widgets            |     Version:  4.9
 Severity:  normal             |  Resolution:
 Keywords:  reporter-feedback  |     Focuses:
-------------------------------+--------------------

Comment (by Andy Schmidt):

 Replying to [comment:2 westonruter]:

 >> When you say it appears to save, does the Save button become disabled
 and the dirty state clear? <<

 If I can figure out how, I'll attach a screen shot what happens when you
 press Save (with Debug mode on so that you can see the PHP error). The
 "Save" button will changed to "Saved". You can click "Done" to exit the
 instance, and the instance will be an item in the list of widgets for that
 sidebar, as if it had been successfully saved.

 However, if you exit the Widget section of the admin, click some other
 admin function and then RETURN to the Widget admin, that particular Widget
 instance does NOT appear in that side bar any more. So in reality it was
 never properly saved/tied into that sidebar.

 >> Is it just that validity reporting isn't happening? <<

 The "required" attribute seems to be active as far as HTML. The error will
 NOT occur as long as I try to save with a required field not yet entered.
 However, the moment I correctly complete the form with ALL required
 fields, THEN the "Save" button triggers the PHP error.

 >> Support for validity constraints was added <<

 Maybe an error was introduced when it was added. I'm producing this
 problem with 4.9.1!

--
Ticket URL: <https://core.trac.wordpress.org/ticket/43003#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list