Make WordPress Core

Opened 5 years ago

Last modified 22 months ago

#55503 assigned defect (bug)

Post Date display issue if we set empty from General Settings page

Reported by: rishishah Owned by: pbearne
Priority: normal Milestone: Awaiting Review
Component: Date/Time Version:
Severity: normal Keywords: dev-feedback
Cc: Focuses: administration

Description

Hello,

I have faced one issue with the post date field on the backend side.

If we set empty Date and Time format from the General Settings page then the post date will be empty displaying on the edit screen of an article(any post type).
We need to set any default date and time format to display or make the Date format and Time format field required. If any admin set it empty mistakenly then it will take hours to figure out the root cause of the issue.

Attachments (3)

post date bug.jpg​ (543.9 KB ) - added by rishishah 5 years ago.
55503.patch​ (1.0 KB ) - added by rishishah 5 years ago.
Applied patch to add default value if anyone kept blank Date and Time format field.
55503.1.patch​ (973 bytes ) - added by jariwalasagar 5 years ago.
Instead of add static Date/Time format, We can use previous stored data if custom formats are null.

Download all attachments as: .zip

Change History (7)

@rishishah
5 years ago

Applied patch to add default value if anyone kept blank Date and Time format field.

#1 @SergeyBiryukov
5 years ago

  • Component Administration → Date/Time

#2 @Rarst
5 years ago

Technically empty string is a valid date format. I would be wary of introducing a special case for it, given it is long established feature and upstream PHP functions do not act like that.

Also I am not sure anyone in the wild uses it to blank output purposely, but can't be sure they are not either.

@jariwalasagar
5 years ago

Instead of add static Date/Time format, We can use previous stored data if custom formats are null.

#3 @pbearne
22 months ago

  • Keywords dev-feedback added
  • Owner set to pbearne
  • Status new → assigned

I will ask the core dev for feedback on this

This ticket was mentioned in ​Slack in #core-datetime by pbearne. ​View the logs.


22 months ago

Note: See TracTickets for help on using tickets.