Problem
Older versions of Betheme theme has code that is incompatible with PHP 7. From Version 20.8.4 this issue should be rectified, but you might find that older versions that are bundled with themes may not support PHP 7.
In the case where you have an incompatible Betheme theme installed, it may result in a 500 error when updating the pages/posts which are using this theme.
Solution
Firstly, Set up an SFTP user using an SFTP client like FileZilla and use SFTP to access the file system as explained here
Secondly, open the file /wp/wp-content/themes/betheme/functions/builder/back.php
Somewhere around line 918, you’ll find the line:
$mfn_wraps[$parent_wrap_ID]['items'][] = $item;
It must be changed to:
if (!is_array($mfn_wraps[$parent_wrap_ID]['items'])) { $mfn_wraps[$parent_wrap_ID]['items'] = array(); } $mfn_wraps[$parent_wrap_ID]['items'][] = $item;
Somewhere around line 930, you’ll find the line:
$mfn_wraps[$section_key]['wraps'][] = $wrap;
It must be changed to:
if (!is_array($mfn_items[$section_key]['wraps'])) { $mfn_items[$section_key]['wraps'] = array(); } $mfn_items[$section_key]['wraps'][] = $wrap;
This fix should allow you to update Betheme related pages/posts again.