Did you update any other plugins? This don’t seem a metabox problem, but a theme problem.
THe file to look for is: wp-content/themes/betheme 14.2/functions/builder/back.php row 918
Thread Starter
dv14
(@dv14)
Hello,
Yes, everything is updated. WP 5.2 and PHP 7.2.
Row 918 is:
$mfn_wraps[ $parent_wrap_ID ]['items'][] = $item;
from this:
// parent wrap
$parent_wrap_ID = $_POST['mfn-item-parent'][$type_k];
$mfn_wraps[ $parent_wrap_ID ]['items'][] = $item;
}
}
try to disable all plugins and see if it works.
If works, try to enable one plugin at time and see which one causes problems.
I think the problem is betheme 14.2 if you updated it
Hi @dv14,
As @eazy0174 said, the error occurs in a theme file. So, please contact the theme author to fix it. It’s not our plugin’s bug.
Thread Starter
dv14
(@dv14)
Thank you for your help, @eazy0174 and @rilwis. I’ll reach out theme.
Hey @dv14, did you ever get a resolution to this issue? Because I am having the identical problem on my site.
The line $mfn_wraps[ $parent_wrap_ID ]['items'][] = $item; is throwing the error: “Uncaught Error: [] operator not supported for strings”
Thread Starter
dv14
(@dv14)
@ryandiaz, Yes, we had to update the theme, php version, and some other values I recall. I pointed those issues to “WordPress Premium Support” and they fixed it.
For anyone using old version of BeTheme and encounters this error. I fixed by replacing the below code:
$mfn_wraps[ $parent_wrap_ID ]['items'][] = $item;
with this code:
if (! isset($mfn_wraps[ $parent_wrap_ID ]['items']) || ! is_array($mfn_wraps[ $parent_wrap_ID ]['items'])) {
$mfn_wraps[ $parent_wrap_ID ]['items'] = array();
}
$mfn_wraps[ $parent_wrap_ID ]['items'][] = $item;
@ryandiaz I made the suggested changes but still getting an error. Any other input?
Mine happens on line 887, not sure that matters?
Thanks
-
This reply was modified 6 years, 7 months ago by
mdurland28.
Hey @mdurland28, no it shouldn’t matter which line you are getting the error on. Please post the exact error that you are seeing, and post all of the code that starts on Line 887, and I will try to assist you!
Thanks @ryandiaz! Let me know if you need anymore info.
Error Details
=============
An error of type E_ERROR was caused in line 887 of the file /home/ajbioozs/public_html/wp-content/themes/betheme/functions/builder/back.php. Error message: Uncaught Error: [] operator not supported for strings in /home/ajbioozs/public_html/wp-content/themes/betheme/functions/builder/back.php:887
Stack trace:
#0 /home/ajbioozs/public_html/wp-content/themes/betheme/functions/meta-portfolio.php(429): mfn_builder_save(620)
#1 /home/ajbioozs/public_html/wp-includes/class-wp-hook.php(288): mfn_portfolio_save_data(620)
#2 /home/ajbioozs/public_html/wp-includes/class-wp-hook.php(310): WP_Hook->apply_filters(NULL, Array)
#3 /home/ajbioozs/public_html/wp-includes/plugin.php(465): WP_Hook->do_action(Array)
#4 /home/ajbioozs/public_html/wp-includes/post.php(3951): do_action(‘save_post’, 620, Object(WP_Post), true)
#5 /home/ajbioozs/public_html/wp-includes/post.php(4028): wp_insert_post(Array, false)
#6 /home/ajbioozs/public_html/wp-admin/includes/post.php(405): wp_update_post(Array)
#7 /home/ajbioozs/public_html/wp-admin/includes/post.php(1858): edit_post()
#8 /home/ajbioozs/public_html/wp-admin/post.php(318): post_preview()
#9 {main}
thrown
Here is the code starting on line 887 through 892:
$mfn_wraps[ $parent_wrap_ID ][‘items’][] = $item;
}
}
// $mfn_items | Wraps with Items => Sections ————————————
@ryandiaz`By the way this is for PHP 7.3
-
This reply was modified 6 years, 7 months ago by
mdurland28.
-
This reply was modified 6 years, 7 months ago by
mdurland28.
Hey @mdurland28,
Thank you for providing that extra information. I see that your Line 887 on back.php has the same code that I used to have before I updated it. You said that you made my suggested changes, and still receive the same error. Did you undo my suggested changes? If so, please do my suggested changes again, and then post all of the code in your back.php from Line 887 – 892 again.
@ryandiaz changed and still getting this error message when previewing a page in editor
The site is experiencing technical difficulties. Please check your site admin email inbox for instructions.
Here you go with line 887 – 892 suggested changes:
if (! isset($mfn_wraps[ $parent_wrap_ID ][‘items’]) || ! is_array($mfn_wraps[ $parent_wrap_ID ][‘items’])) {
$mfn_wraps[ $parent_wrap_ID ][‘items’] = array();
}
$mfn_wraps[ $parent_wrap_ID ][‘items’][] = $item;
}
}
if (! isset($mfn_wraps[ $parent_wrap_ID ][‘items’]) || ! is_array($mfn_wraps[ $parent_wrap_ID ][‘items’])) {
$mfn_wraps[ $parent_wrap_ID ][‘items’] = array();
}
$mfn_wraps[ $parent_wrap_ID ][‘items’][] = $item;
}
}