#62078 closed defect (bug) (duplicate)
Crash: Settings>General Config Timezone and Custom Date Format crashes on save
Reported by: |
|
Owned by: | |
---|---|---|---|
Milestone: | Priority: | normal | |
Severity: | normal | Version: | 6.0 |
Component: | Date/Time | Keywords: | |
Focuses: | administration | Cc: |
Description
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.
Hello @vanlyle,
Welcome to WordPress Core's Trac. I'm sorry you've experienced this issue with the Date/Time.
Looking at the error:
this error is known and has been reported in #56358 and is closely related to #58986 and #60629 as all of these bug reports are for the same data type conversion issue.
There's good news. A fix was committed via [59064]. It's currently available in WordPress
trunk
for testing and will be available with WP 6.7 Beta 1 et al for testing. If you're able, appreciate you testing the fix and providing feedback.As this bug existed before WordPress 6.6, the bugfix will not be available in a future 6.6.3 minor release. But it will be available during 6.7 and, pending no unforeseen issues, should ship in 6.7.
I'll close this ticket as a duplicate of #56358, i.e. to keep the discussion in one ticket.
That said, if the error you're experiencing is different and is not resolved by [59064], please reopen this ticket and share those details.