Home › Toolset Professional Support › [Resolved] Fatal error: Uncaught TypeError
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 |
|---|---|---|---|---|---|---|
| - | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10:00 – 13:00 | 10: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/Kolkata (GMT+05:30)
This topic contains 7 replies, has 1 voice.
Last updated by lindsayH 2 weeks, 4 days ago.
Assisted by: Minesh.
When I click on a view I get the following error:
Fatal error: Uncaught TypeError: Unsupported operand types: string - string in /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/toolset.function.helpers.php:205 Stack trace: #0 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/wpv-user-functions.php(555): wpv_filter_parse_date('PAST_MONTH(),NO...') #1 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/wpv-user-functions.php(132): wpv_apply_user_function_date_compare('PAST_MONTH(),NO...') #2 /home2/subdomain.mywebsite.co.uk/wp-includes/class-wp-hook.php(341): wpv_filter_resolve_variable_date_timestamp('PAST_MONTH(),NO...', Array) #3 /home2/subdomain.mywebsite.co.uk/wp-includes/plugin.php(205): WP_Hook->apply_filters('PAST_MONTH(),NO...', Array) #4 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/filters/wpv-filter-meta-field-embedded.php(162): apply_filters('wpv_resolve_var...', 'PAST_MONTH(),NO...', Array) #5 /home2/subdomain.mywebsite.co.uk/wp-includes/class-wp-hook.php(341): WPV_Meta_Frontend_Filter::filter_post_meta(Array, Array, '1982') #6 /home2/subdomain.mywebsite.co.uk/wp-includes/plugin.php(205): WP_Hook->apply_filters(Array, Array) #7 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/wpv-filter-query.php(818): apply_filters('wpv_filter_quer...', Array, Array, '1982') #8 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/wpv.class.php(2551): wpv_filter_get_posts('1982') #9 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/wpv.class.php(2172): WP_Views->render_view('1982', '8a9d3d61db84432...') #10 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/embedded/inc/wpv.class.php(681): WP_Views->render_view_ex('1982', '8a9d3d61db84432...') #11 /home2/subdomain.mywebsite.co.uk/wp-includes/shortcodes.php(434): WP_Views->short_tag_wpv_view(Array, '', 'wpv-view') #12 [internal function]: do_shortcode_tag(Array) #13 /home2/subdomain.mywebsite.co.uk/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(wpv\\-v...', 'do_shortcode_ta...', '<p>\n<a class="p...') #14 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/types-access/application/controllers/shortcodes.php(159): do_shortcode('<p>\n<a class="p...') #15 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/types-access/application/controllers/shortcodes.php(110): OTGS\Toolset\Access\Controllers\Shortcodes->wpcf_access_do_shortcode_content('<p>\n<a class="p...', 'false') #16 /home2/subdomain.mywebsite.co.uk/wp-includes/shortcodes.php(434): OTGS\Toolset\Access\Controllers\Shortcodes->create_shortcode_toolset_access(Array, '<br />\n<a class...', 'toolset_access') #17 [internal function]: do_shortcode_tag(Array) #18 /home2/subdomain.mywebsite.co.uk/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(toolse...', 'do_shortcode_ta...', '[toolset_access...') #19 /home2/subdomain.mywebsite.co.uk/wp-includes/class-wp-hook.php(341): do_shortcode('[toolset_access...') #20 /home2/subdomain.mywebsite.co.uk/wp-includes/plugin.php(205): WP_Hook->apply_filters('[toolset_access...', Array) #21 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts-genesis/application/theme/shortcode/view/post_template.php(19): apply_filters('the_content', '<p>[toolset_acc...') #22 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts-genesis/library/shortcode/abstract.php(125): require('/home2/cooklawy...') #23 /home2/subdomain.mywebsite.co.uk/wp-includes/shortcodes.php(434): Layouts_Integration_Shortcode_Abstract->output(Array, '', 'genesis-post-te...') #24 [internal function]: do_shortcode_tag(Array) #25 /home2/subdomain.mywebsite.co.uk/wp-includes/shortcodes.php(273): preg_replace_callback('/\\[(\\[?)(genesi...', 'do_shortcode_ta...', '[genesis-post-t...') #26 /home2/subdomain.mywebsite.co.uk/wp-includes/class-wp-hook.php(341): do_shortcode('[genesis-post-t...') #27 /home2/subdomain.mywebsite.co.uk/wp-includes/plugin.php(205): WP_Hook->apply_filters('[genesis-post-t...', Array) #28 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/inc/cell_types/wpddl.cell_text.class.php(94): apply_filters('the_content', '[genesis-post-t...') #29 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/inc/cell_types/wpddl.cell_text.class.php(75): WPDD_layout_cell_text->handle_content_filters('[genesis-post-t...') #30 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layout.class.php(1016): WPDD_layout_cell_text->frontend_render_cell_content(Object(WPDD_BootstrapThree_render)) #31 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layout.class.php(609): WPDD_layout_cell->frontend_render(Object(WPDD_BootstrapThree_render)) #32 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layout.class.php(91): WPDD_layout_row->frontend_render(Object(WPDD_BootstrapThree_render)) #33 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layout-render.class.php(137): WPDD_layout->frontend_render(Object(WPDD_BootstrapThree_render)) #34 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layout-render.class.php(135): WPDD_layout_render->render_to_html() #35 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layout-render.class.php(453): WPDD_layout_render->render_to_html() #36 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layouts.render.manager.class.php(575): WPDD_layout_render->render() #37 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes-auto/wpddl.layouts.render.manager.class.php(557): WPDD_Layouts_RenderManager->get_rendered_layout_content(Object(WPDD_layout), Array) #38 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/classes/wpddl.class.php(1443): WPDD_Layouts_RenderManager->get_layout_content_for_render(Object(WPDD_layout), Array) #39 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/inc/api/ddl-theme-api.php(47): WPDD_Layouts->get_layout_content_for_render('', Array) #40 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts/inc/api/ddl-theme-api.php(13): get_the_ddlayout('', Array) #41 /home2/subdomain.mywebsite.co.uk/wp-content/plugins/layouts-genesis/application/setup.php(282): the_ddlayout() #42 /home2/subdomain.mywebsite.co.uk/wp-includes/class-wp-hook.php(341): WPDDL_Integration_Setup->genesis_do_loop('') #43 /home2/subdomain.mywebsite.co.uk/wp-includes/class-wp-hook.php(365): WP_Hook->apply_filters(NULL, Array) #44 /home2/subdomain.mywebsite.co.uk/wp-includes/plugin.php(522): WP_Hook->do_action(Array) #45 /home2/subdomain.mywebsite.co.uk/wp-content/themes/genesis/lib/framework.php(66): do_action('genesis_loop') #46 /home2/subdomain.mywebsite.co.uk/wp-content/themes/genesis/page.php(15): genesis() #47 /home2/subdomain.mywebsite.co.uk/wp-includes/template-loader.php(132): include('/home2/cooklawy...') #48 /home2/subdomain.mywebsite.co.uk/wp-blog-header.php(19): require_once('/home2/cooklawy...') #49 /home2/subdomain.mywebsite.co.uk/index.php(17): require('/home2/cooklawy...') #50 {main} thrown in /home2/subdomain.mywebsite.co.uk/wp-content/plugins/wp-views/vendor/toolset/toolset-common/inc/toolset.function.helpers.php on line 205
I'm not sure where to start. This is an older site and obviously this Toolset View was working.
Thank you.
PS. I did update my PHP to 8.2 but that didn't help.
Hello. Thank you for contacting the Toolset support.
This is really strange.
Could you please try to resolve your issue by deactivating all third-party plugins as well as the default theme to check for any possible conflicts with any of the plugins or themes?
- Do you see any difference? if no:
Just to make sure its compatibility issue with PHP version - does it work as expected with PHP version 8.0.x or 8.1.x?
Hi deactivated all third party plugins and default theme.
Still get "There has been a critical error on this website" - other Views run fine.
Also tried PHP 8.0 and 8.1 and 8.3 no change in the error.
Thanks for your help.
That is really strange. I'm not sure why you see the fatal error.
Can you please share problem URL or exact steps I will have to follow that should help me to see the issue.
*** Please make a FULL BACKUP of your database and website.***
I would also eventually need to request temporary access (WP-Admin and FTP) to your site. Preferably to a test site where the problem has been replicated if possible in order to be of better help and check if some configurations might need to be changed.
I have set the next reply to private which means only you and I have access to it.
Can you please check now: hidden link
With your view:
- hidden link
I've adjusted the date filter as given under:
Select items with field:
Employee Registration Date is a UNSIGNED between PAST_MONTH(1), NOW()
Do you see it working as expected.
Thank you so much. This does seem to be working now with your changes. When I set it up I don't think I had the options SIGNED and UNSIGNED. So has an update changed this along the way - and what do they mean/when would you choose to use them.
Thanks very much for all your help. Much appreciated.
When I set it up I don't think I had the options SIGNED and UNSIGNED. So has an update changed this along the way - and what do they mean/when would you choose to use them.
====>
Toolset stores the custom date field value as Unix Timestamp. The SIGNED and UNSIGNED options were there since many years or begginging. The issue was you did not added post month and value to that you should input as 1 as you wanted to display 1 month old post. The value was blank that is why you were experince the error.
Just to say - I don't think I ever used the SIGNED and UNSIGNED option. Also this view was originally fine. It would have been many years since I created though.
Happy it's been resolved. Thank you for your help.
Thank you.