Saving metabox updates causing fatal error

You are getting that fatal error because your custom mdb_save_metaboxes function is expecting to receive 3 parameters (function mdb_save_metaboxes($post_id, $post, $update)), but WordPress only passed 1 parameter, because you did not tell WordPress that it needs to pass 3 parameters. So to fix the issue, set the fourth parameter for add_action() like so: // If … Read more

“CRITICAL Object of class WP_Error could not be converted to string” using templates with twig

wp_get_post_terms() returns a WP_Error on failure. (Are you sure it’s $colection and not $collection in that function call?) You can check the return value using is_wp_error() and decide what you’re going to output if it is, in fact, a WP_Error. For example: $term = wp_get_post_terms( $colection->posts[0]->ID ,’look’ ); if ( is_wp_error( $term ) ) { … Read more

How to fix Fatal error: Cannot redeclare get_cli_args() in class-wp-importer.php

Are you somehow including wp-admin\includes\class-wp-importer.php using include or require? That may cause the error of get_cli_args() function declared twice. If that is the case, then you better use include_once or require_once. Also, perhaps you should test your installation by disabling all the plugins and any custom theme. Then activate the theme and test WordPress. Then … Read more

Call to undefined function create_function()

create_function was removed in PHP 8.0, so your theme does not appear to be compatible with PHP 8.0+. You have several options to resolve this: If your site is down and it is important to get your site up immediately, ask your host to downgrade PHP to 7.4. Just be aware that security support for … Read more