Site broken due to update
-
Hi, due to the update to version 2.4.9 mi site is broken. I can only get “Error establishing a database connection”. Deleting the plugin through the file manager of my hosting didn’t help. Uploading the so called solution, version 2.4.10 didn’t help either. Since I cannot enter the wp-admin anymore, due to the database error, there is no other way to fix it. What can I do?
The page I need help with: [log in to see the link]
-
Hi @mwestrik
Sorry to hear you are having this issue,
We released the 2.4.10 fixing some database problem, the reason deleting the plugin didn’t help might be because hosting limiting the max_connections or stuck connections didn’t clean up. Could you please reach your hosting support to restart the MySQL service and see if it returns?
Once the site is up back, please, also share some information around your hosting environment, for instance, the MySQL / Maria DB version, PHP version, max execution time and PHP Memory limit.
If restarting the SQL service doesn’t help, ask your hosting support for any log that might help us to identify the problem and share with us via email wpsupport@incsub.com following the:
Subject: ATTN: WPMU DEV support – wp.org
Please send:
– Link to your WordPress site
– Download link to file eg. Google drive
– Link back to this thread for reference: https://wordpress.org/support/topic/site-broken-due-to-update/
– Any other relevant URLs/infoTo ensure we don’t miss your email, please let us know here once you’ve submitted the form and make sure you use “ATTN: WPMU DEV support – wp.org” as the email subject.
Best Regards
Patrick FreitasBug report — Broken Link Checker 2.4.7
Summary: Site-wide fatal error (front end + wp-admin) when the scheduled scan time is stored in 24-hour format.
build_daily_schedule_timestamp()dereferences the return value ofdate_create_from_format()without checking forfalse.Error:
Fatal error: Uncaught Error: Call to a member function getTimestamp() on bool in .../broken-link-checker/app/scheduled-events/scan/class-controller.php:282Call chain:
Options\Settings\Controller->initialise()→activation_actions()(line 130) →Scan\Controller->set_scan_schedule()→get_timestamp()(line 185) →build_daily_schedule_timestamp()(line 223).Because this runs on plugin init, the crash occurs on every request — the site is fully unreachable and the plugin cannot be deactivated through wp-admin. Recovery requires SSH/FTP.
Root cause: at line ~277 the method parses with the 12-hour format
'g:i a':php
$schedule_time = date_create_from_format( 'g:i a', $time, wp_timezone() ); if ( $current_time > $schedule_time->getTimestamp() ) {The stored value in
blc_settings→schedule.timewas"00:00", which cannot match'g:i a', so parsing returnsfalseand line 282 fatals. The method’s own docblock contradicts the implementation — it documents@param string $time The time of the day in HH:MM formatwhile the parser expectsg:i a. Note thatUtilities::str_to_time()in the two branches immediately below handles"00:00"correctly, so only this one comparison is format-sensitive.Repro: set
blc_settings→schedule.timeto"00:00"withschedule.active = "1"andfrequency = "daily", then load any page.Suggested fix:
- Guard the return value — fall back to
Utilities::str_to_time( "today {$time}" )(or skip the comparison) when parsing yieldsfalse. - Accept both formats, or normalise
schedule.timeon read/write so the stored value and the parser agree. - Correct the docblock to match whichever format becomes canonical.
Worth checking on their side: how the settings UI serialises the time field. If the save handler writes 24-hour values while the reader expects 12-hour, any user selecting midnight bricks their site — and re-bricks it after each save.
Environment: BLC 2.4.7, multilingual WordPress site (DE/EN/IT),
installation_timestamp: nullinblc_settings(unrelated to this crash, but possibly also unset by their installer).Thank you for all the detail.
Although this can be one of the reason we need to handle case by case.
For instance, the fatal error would be gone if the problem is a matter of the plugin level but in the @mwestrik the database didn’t recover.
We can still try to reset the cron via PHPmyAdmin https://wordpress.stackexchange.com/a/175880 if for any reason the corruption is happening on that table.
Can you please confirm if your report is related to @mwestrik website? If not, please create a new thread and we will handle it from there.
I am also forwarding your responses to our developers.
Best Regards
PatricK FreitasJust an update, this is a reported issue https://wordpress.org/support/topic/v-2-4-9-2-4-10-fatal-error-call-to-a-member-function-gettimestamp/, our developers already implemented a fix, can you please update to 2.4.11?
Best Regards
Patrick Freitas - Guard the return value — fall back to
You must be logged in to reply to this topic.