Skip Navigation

[Resolved] Broken page after upgrade to php 8

This support ticket is created 2 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

This is the technical support forum for Toolset - a suite of plugins for developing WordPress sites without writing PHP.

Everyone can read this forum, but only Toolset clients can post in it. Toolset support works 6 days per week, 19 hours per day.

Sun Mon Tue Wed Thu Fri Sat
- 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 9:00 – 13:00 -
- 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 14:00 – 18:00 -

Supporter timezone: Asia/Karachi (GMT+05:00)

This topic contains 2 replies, has 2 voices.

Last updated by cna-serviziS 2 years, 3 months ago.

Assisted by: Waqar.

Author
Posts
#2467565

Hi,
I've just replaced an old WP website with a new one.
All looked fine. I then tried to upgrade to php 8 and this page hidden link got completely broken.
I then downgraded again but I'd like to sort it out and move up as quickly as possible.
I'll attach Toolset debug info.
Thank you,

Here is the error:
Fatal error: Uncaught TypeError: call_user_func_array(): Argument #1 ($callback) must be a valid callback, class Tribe__Events__Query does not have a method "pre_get_posts" in /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php:307 Stack trace: #0 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters(NULL, Array) #1 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(524): WP_Hook->do_action(Array) #2 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-query.php(1805): do_action_ref_array('pre_get_posts', Array) #3 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-query.php(3586): WP_Query->get_posts() #4 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-query.php(3718): WP_Query->query(Array) #5 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/wp_query_factory.php(20): WP_Query->__construct(Array) #6 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/autoloaded/field/group/factory.php(444): OTGS\Toolset\Common\WpQueryFactory->create(Array) #7 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/types/vendor/toolset/toolset-common/inc/public_api/custom_fields.php(36): Toolset_Field_Group_Factory->query_groups(Array) #8 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/ToolsetSources/CustomFieldService.php(34): toolset_get_field_groups(Array) #9 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/ToolsetSources/DynamicSourceFactory.php(80): Toolset\DynamicSources\ToolsetSources\CustomFieldService->get_group_slugs_by_type('uno-di-noi') #10 [internal function]: Toolset\DynamicSources\ToolsetSources\DynamicSourceFactory->Toolset\DynamicSources\ToolsetSources\{closure}(Array, 'uno-di-noi') #11 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/ToolsetSources/DynamicSourceFactory.php(82): array_reduce(Array, Object(Closure), Array) #12 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/ToolsetSources/DynamicSourceFactory.php(35): Toolset\DynamicSources\ToolsetSources\DynamicSourceFactory->aggregate_group_slugs(Array) #13 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/ToolsetSources/Main.php(68): Toolset\DynamicSources\ToolsetSources\DynamicSourceFactory->get_sources(Array) #14 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(307): Toolset\DynamicSources\ToolsetSources\Main->Toolset\DynamicSources\ToolsetSources\{closure}(Array, Array) #15 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(191): WP_Hook->apply_filters(Array, Array) #16 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/DynamicSources.php(455): apply_filters('toolset/dynamic...', Array, Array) #17 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/DynamicSources.php(399): Toolset\DynamicSources\DynamicSources->register_data_sources(Array) #18 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(307): Toolset\DynamicSources\DynamicSources->register_sources('') #19 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #20 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #21 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/DynamicSources.php(775): do_action('toolset/dynamic...') #22 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/DynamicSources.php(744): Toolset\DynamicSources\DynamicSources->get_shortcode_content(Array) #23 /home/customer/www/biella.cna.it/public_html/wp-includes/shortcodes.php(356): Toolset\DynamicSources\DynamicSources->dynamic_shortcode_render(Array, '', 'tb-dynamic') #24 [internal function]: do_shortcode_tag(Array) #25 /home/customer/www/biella.cna.it/public_html/wp-includes/shortcodes.php(228): preg_replace_callback('/\\[(\\[?)(tb\\-dy...', 'do_shortcode_ta...', '[tb-dynamic pro...') #26 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/DynamicSources.php(920): do_shortcode('[tb-dynamic pro...') #27 [internal function]: Toolset\DynamicSources\DynamicSources->Toolset\DynamicSources\{closure}(Array) #28 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/vendor/toolset/dynamic-sources/server/DynamicSources.php(919): preg_replace_callback('#(\\[tb-dynamic\\...', Object(Closure), '\n<div class="wp...') #29 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(307): Toolset\DynamicSources\DynamicSources->shortcode_render('\n<div class="wp...') #30 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(191): WP_Hook->apply_filters('\n<div class="wp...', Array) #31 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/embedded/inc/wpv-shortcodes.php(2587): apply_filters('wpv-pre-do-shor...', '\n<div class="wp...') #32 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/embedded/inc/wpv.class.php(2610): wpv_do_shortcode('\n<div class="wp...') #33 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/embedded/inc/wpv.class.php(2141): WP_Views->render_view('6510', '6d81b258c3ebbc0...') #34 /home/customer/www/biella.cna.it/public_html/wp-content/plugins/wp-views/embedded/inc/wpv.class.php(646): WP_Views->render_view_ex('6510', '6d81b258c3ebbc0...') #35 /home/customer/www/biella.cna.it/public_html/wp-includes/shortcodes.php(356): WP_Views->short_tag_wpv_view(Array, '', 'wpv-view') #36 [internal function]: do_shortcode_tag(Array) #37 /home/customer/www/biella.cna.it/public_html/wp-includes/shortcodes.php(228): preg_replace_callback('/\\[(\\[?)(wpv\\-v...', 'do_shortcode_ta...', '<style id="kb-r...') #38 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(307): do_shortcode('<style id="kb-r...') #39 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(191): WP_Hook->apply_filters('<style id="kb-r...', Array) #40 /home/customer/www/biella.cna.it/public_html/wp-includes/post-template.php(253): apply_filters('the_content', '<!-- wp:kadence...') #41 /home/customer/www/biella.cna.it/public_html/wp-content/themes/kadence/template-parts/content/entry_content.php(27): the_content('Continua legger...') #42 /home/customer/www/biella.cna.it/public_html/wp-includes/template.php(772): require('/home/customer/...') #43 /home/customer/www/biella.cna.it/public_html/wp-includes/template.php(716): load_template('/home/customer/...', false, Array) #44 /home/customer/www/biella.cna.it/public_html/wp-includes/general-template.php(204): locate_template(Array, true, false, Array) #45 /home/customer/www/biella.cna.it/public_html/wp-content/themes/kadence/template-parts/content/single-entry.php(28): get_template_part('template-parts/...', 'page') #46 /home/customer/www/biella.cna.it/public_html/wp-includes/template.php(772): require('/home/customer/...') #47 /home/customer/www/biella.cna.it/public_html/wp-includes/template.php(716): load_template('/home/customer/...', false, Array) #48 /home/customer/www/biella.cna.it/public_html/wp-includes/general-template.php(204): locate_template(Array, true, false, Array) #49 /home/customer/www/biella.cna.it/public_html/wp-content/themes/kadence/inc/template-functions/single-functions.php(27): get_template_part('template-parts/...', 'page') #50 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(307): Kadence\single_content('') #51 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #52 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #53 /home/customer/www/biella.cna.it/public_html/wp-content/themes/kadence/template-parts/content/single.php(34): do_action('kadence_single_...') #54 /home/customer/www/biella.cna.it/public_html/wp-includes/template.php(772): require('/home/customer/...') #55 /home/customer/www/biella.cna.it/public_html/wp-includes/template.php(716): load_template('/home/customer/...', false, Array) #56 /home/customer/www/biella.cna.it/public_html/wp-includes/general-template.php(204): locate_template(Array, true, false, Array) #57 /home/customer/www/biella.cna.it/public_html/wp-content/themes/kadence/inc/template-functions/single-functions.php(20): get_template_part('template-parts/...', 'page') #58 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(307): Kadence\single_markup('') #59 /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php(331): WP_Hook->apply_filters('', Array) #60 /home/customer/www/biella.cna.it/public_html/wp-includes/plugin.php(476): WP_Hook->do_action(Array) #61 /home/customer/www/biella.cna.it/public_html/wp-content/themes/kadence/page.php(20): do_action('kadence_single') #62 /home/customer/www/biella.cna.it/public_html/wp-includes/template-loader.php(106): include('/home/customer/...') #63 /home/customer/www/biella.cna.it/public_html/wp-blog-header.php(19): require_once('/home/customer/...') #64 /home/customer/www/biella.cna.it/public_html/index.php(17): require('/home/customer/...') #65 {main} thrown in /home/customer/www/biella.cna.it/public_html/wp-includes/class-wp-hook.php on line 307

#2468865

Hi,

Thank you for contacting us and I'd be happy to assist.

The error message suggests that this issue is related to the code from the "The Events Calendar" plugin and not Toolset.

Can you please make sure that WordPress, active theme, and plugins are all updated to the latest versions?

It would also be interesting to test this with all non-Toolset plugins disabled and a default theme like Twenty Twenty-One.

If it's fixed, you can start adding the disabled items, one-by-one, to narrow down to a possible conflicting one.

I hope this helps and let me know how it goes.

regards,
Waqar

#2469963

Thank you Waqar,
it turns out the last upgrade of the Events Calendar to the new data system is generating some errors which don't have a fix at the moment. We've decided to remove the plugin.
Thank you for your help