[wp-trac] [WordPress Trac] #62078: Crash: Settings>General Config Timezone and Custom Date Format crashes on save
WordPress Trac
noreply at wordpress.org
Wed Sep 18 23:00:03 UTC 2024
#62078: Crash: Settings>General Config Timezone and Custom Date Format crashes on
save
----------------------------+-----------------------------
Reporter: vanlyle | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Date/Time | Version: 6.6.2
Severity: normal | Keywords:
Focuses: administration |
----------------------------+-----------------------------
After installing WP 6.6.2 I went to Settings>General and changed the
Timezone to Vancouver and created a custom date format of jM'y (which
shows a preview as 08sep'24 ) When I saved the configuation I get the
"Internal Error" crash message.
After that point installing, activating or deleting plug-ins can and do
fail.
I stumbled upon this bug over a year ago but didn't realize this was the
cause at the time. We had a lot of problems with our WP site during that
period and wasted a lot of time trying to fix issues. Trying to restore
from backups using UpdraftPlus would fail with the message: PHP Fatal
error (TypeError) has occurred during restore_alldownloaded subaction.
Error Message: Unsupported operand types: string * int (Code: 0, line 76
in /var/www/html/op-includes/functions.php
When I looked at that code location I could see it was related to dates
and/or timezones and that's what clued me into the possible cause.
Working with a fresh install of WP 6.6.2 and I was able to reproduce the
bug multiple times.
It's the **combination of setting both the TZ and date format at the same
time and then saving** the configuration that causes the crash. If you set
the TZ and save the configuration and then set the custom date format and
save the configuration there's no problem.
Just in case the apostrophe ' in the date format was causing the problem I
escaped it as in jM\'y. But made no difference - still crashed.
This is running on Ubuntu with Apache, PHP 8.0.30, MySQL 8.0.30
I searched for previous tickets reporting this particular issue but
couldn't find one.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/62078>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list