Hi there,
we are using the elemento theme on longma.coach. After converting the installation to multisite we discovered a strange error creating new pages or posts on a new created site. Turning on debug, we got the following error:
PHP Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, function “elemento_excerpt” not found or invalid function name in /
homepages/12/d891708499/htdocs/wordpress/wp-includes/class-wp-hook.php:307
Stack trace:
#0 /homepages/12/d891708499/htdocs/wordpress/wp-includes/plugin.php(191): WP_Hook->apply_filters(”, Array)
#1 /homepages/12/d891708499/htdocs/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(1825): apply_filters(‘the_excerpt’, ”)
#2 /homepages/12/d891708499/htdocs/wordpress/wp-includes/rest-api/endpoints/class-wp-rest-posts-controller.php(560): WP_REST_Posts_Controller->prepare_item_for_response(Object(WP_Post), Object(WP_REST_Reque
st))
#3 /homepages/12/d891708499/htdocs/wordpress/wp-includes/rest-api/class-wp-rest-server.php(1143): WP_REST_Posts_Controller->get_item(Object(WP_REST_Request))
#4 /homepages/12/d891708499/htdocs/wordpress/wp-includes/rest-api/class-wp-rest-server.php(990): WP_REST_Server->respond_to_request(Object(WP_REST_Request), ‘/wp/v2/pages/(?…’, Array, NULL)
#5 /homepages/12/d891708499/htdocs/wordpress/wp-includes/rest-api.php(519): WP_REST_Server->dispatch(Object(WP_REST_Request))
#6 /homepages/12/d891708499/htdocs/wordpress/wp-includes/rest-api.php(2868): rest_do_request(Object(WP_REST_Request))
#7 [internal function]: rest_preload_api_request(Array, ‘/wp/v2/pages/61…’)
#8 /homepages/12/d891708499/htdocs/wordpress/wp-includes/block-editor.php(601): array_reduce(Array, ‘rest_preload_ap…’, Array)
#9 /homepages/12/d891708499/htdocs/wordpress/wp-admin/edit-form-blocks.php(75): block_editor_rest_api_preload(Array, Object(WP_Block_Editor_Context))
#10 /homepages/12/d891708499/htdocs/wordpress/wp-admin/post.php(187): require(‘/homepages/12/d…’)
#11 {main}
thrown in /homepages/12/d891708499/htdocs/wordpress/wp-includes/class-wp-hook.php on line 307
I was able to fix this by commenting out the second occurence of the line
add_action( ‘the_excerpt’, ‘elemento_excerpt’, 10);
from inc/template_functions.php.
I assume that this line should not be there at all as it defines the hook on non-admin pages where the function itself is never defined at all.
Hope to be helpful
Yours
Wolfgang
]]>My site is under contruction so cannot share the link yrt.
But I am trying to remove the sidebar on the woocommerce shop page.
Please assist.
How can i remove the demo laptop banner slider image and text?
it can’t be seen in the configuration, but it still displays on page.
thanks
]]>How do I remove “Recent Posts”, “Recent Comments”, “Archives”, etc from my homepage?
]]>