[wp-trac] [WordPress Trac] #17180: Invalid published date insertion in posts

WordPress Trac wp-trac at lists.automattic.com
Wed Jun 27 04:03:44 UTC 2012


#17180: Invalid published date insertion in posts
------------------------------------+-----------------------------
 Reporter:  hew                     |       Owner:  westi
     Type:  defect (bug)            |      Status:  assigned
 Priority:  high                    |   Milestone:  Future Release
Component:  Date/Time               |     Version:
 Severity:  major                   |  Resolution:
 Keywords:  has-patch dev-feedback  |
------------------------------------+-----------------------------

Comment (by jkudish):

 In [http://core.trac.wordpress.org/raw-
 attachment/ticket/17180/17180-3.diff 17180-3.diff]:

 * Check the dates via js whenever the post publishing form `#post` is
 submitted. If the dates are invalid, prevent publish, hide the ajax
 loaded, remover the disabled state from the publish button and slide down
 the `#timestampdiv` revealing the date error (highlited in red)
 * Check the dates with php's native `chekdate()` function before before
 saving a post and return a `WP_Error` if the date is wrong

 Tested the patch with posts, pages and quick edit and it all works as
 expected.

 In regards to:

 Replying to [comment:9 ryan]:
 > We'll need to play nice with plugins that implement non-Gregorian
 calendars.
 > http://wordpress.org/extend/plugins/wp-jalali/

 I tested with this plugin active, but it was hard to tell wether things
 we're behaving properly or not. Partially because I have no knowledge of
 how this calendar work or of arabic (which the plugin's test is in) and
 also because the plugin spits out a bunch of php notices and warnings.
 Nonetheless, I seemed to be able to save posts properly with the plugin
 active.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17180#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list