Complete website crash after upgrading from an old version (22.0.2.1)
We are about to update our site from a rather old version of BeTheme (22.0.2.1) but it makes the site completely unavailable.
On the WP update core page everything seems to go just fine during the update process, we got a success message. But then when refreshing the site it is not available.
The recovery email that WP sends out shows the following info (some parts are in Hungarian but you should see the error):
A(z) /data/www/html/wp-content/themes/betheme/functions/builder/pre-built/class-mfn-pre-built-sections-api.php fájl 14 sora egy E_ERROR típusú hibát okoz. Hibaüzenet: Uncaught Error: Class “Mfn_API” not found in /data/www/html/wp-content/themes/betheme/functions/builder/pre-built/class-mfn-pre-built-sections-api.php:14
Stack trace:
#0 /data/www/html/wp-content/themes/betheme/functions/builder/class-mfn-builder.php(43): require_once()
#1 /data/www/html/wp-content/themes/betheme/functions/builder/class-mfn-builder.php(63): Mfn_Builder->__construct()
#2 /data/www/html/wp-content/themes/betheme-child/functions.php(192): require_once(‘…’)
#3 /data/www/html/wp-settings.php(525): include(‘…’)
#4 /data/www/html/wp-config.php(101): require_once(‘…’)
#5 /data/www/html/wp-load.php(37): require_once(‘…’)
#6 /data/www/html/wp-admin/admin.php(34): require_once(‘…’)
#7 /data/www/html/wp-admin/index.php(10): require_once(‘…’)
#8 {main}
thrown
Our IT was able to get another view on this fatal error (attached as image)
The system details are shown in the following screenshots (taken before the update attempt):
More detailed system info:
### Begin System Info ###
SITE_URL https://test.relnet.hu
HOME_URL https://test.relnet.hu
PHPMailer Version 6.2.0
Permalink Structure /%postname%/
PHP Version 8.0.27
MySQL Version 10.5.13
Web Server Info nginx/1.14.1
User Agent Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:109.0) Gecko/20100101 Firefox/115.0
Multi-site No
PHP Memory Limit 512M
PHP Post Max Size 64M
PHP Upload Max File size 64M
PHP Time Limit 1800 sec
PHP Max Input Vars 5000
WP_DEBUG Disabled
DISPLAY ERRORS N/A
WP Table Prefix Length: 3 Status: Acceptable
WP DB Charset/Collate DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_520_ci
WP ID OK
Session Disabled
Session Name PHPSESSID
Cookie Path /
Save Path /var/lib/php/session
Use Cookies On
Use Only Cookies On
WordPress Memory Limit 512 MB
WordPress Upload Size 1 GB
Filesystem Method direct
SSL SUPPORT SSL extension loaded
MB String MB String extensions loaded
CURRENT THEME Betheme Child: 1.6.1.1
Please help me straightening this out.
Comments
Hi,
I can see that you have a child theme active.
Please switch to the parent theme and check if the problem persists.
You can also disable all the plugins to see if none interfere with it.
Best regards
Hi,
We switched to the parent theme and the update was successful, the site stayed working, but obviously looked awkward. Switching back then to the child theme we got fatal error again:
Fatal error: Uncaught Error: Class "Mfn_API" not found
in /data/www/html/wp-content/themes/betheme/functions/builder/pre-built/class-mfn-pre-built-sections-api.php on line 14
Call stack:
require_once()
Mfn_Builder::__construct()
require_once()
include()
require_once()
require_once()
require_once()
require_once()
What is the solution here to have an updated theme but keep the design changes we made throughout the years without having to redo them all again?
Bests,
You have to revive which changes in the child theme cause this. If you do not know how to do this, you should contact your web developer, as support does not cover child theme modifications.
https://support.muffingroup.com/documentation/installation-updates/#child-theme
Best regards
Dear Phil,
Thank you. We have no other choice than keeping the current version (22.0.2.1) as rewriting all the custom design modification would not be cost effective.
We bumped into another problem when upgrading the WP version. On 5.6.3 everything works fine, but on the latest version (6.3.1) we got a 502 bad gateway error when trying to open any of the pages for editing.
We turned off all the plugins and turned them back one-by-one. We noticed that this error occurs when we switch back the Ultimate Member plugin (latest version 2.6.10).
The error is present even if we change back to the standard theme from the child theme.
In the error log we found the following entry (repeated about 20 times in a row):
"2023/09/05 15:03:11 [error] 1118#0: *2531 FastCGI sent in stderr: "s/betheme/functions/builder/class-mfn-builder-admin.php on line 458PHP message: PHP Warning: Trying to access array offset on value of type bool in /data/www/html/wp-content/themes/betheme/functions/builder/class-mfn-builder-admin.php on line 458PHP"
Line 458 in class-mfn-builder-admin.php looks like this:
Please help us out here.
Thanks.
You can add !empty for 1st $item['size'] variable, like:
!empty['size'] ?