Skip Navigation

[Resolved] Fatal error in Toolset Layouts when opening concept post

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.

Our next available supporter will start replying to tickets in about 0.06 hours from now. Thank you for your understanding.

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 2 replies, has 2 voices.

Last updated by Minesh 1 year, 8 months ago.

Assisted by: Minesh.

Author
Posts
#2587493

Hi!

When opening a custom post type post with the "concept" status in the WordPress backend an error is shown. There are no issues with any other posts.

After enabling debug the following error is shown:

 Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/lib/adodb-time.inc.php:1048 Stack trace: #0 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/lib/adodb-time.inc.php(1048): abs() #1 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields/date.php(320): adodb_date() #2 /home/u46122p41645/domains/example.com/public_html/wp-includes/class-wp-hook.php(308): wpcf_fields_date_value_get_filter() #3 /home/u46122p41645/domains/example.com/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #4 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/toolset-forms/classes/class.field_factory.php(92): apply_filters() #5 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/toolset-forms/classes/class.date.php(59): FieldFactory->getValue() #6 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/toolset-forms/classes/class.form_factory.php(309): WPToolset_Field_Date->metaform() #7 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/toolset-forms/bootstrap.php(66): FormFactory->metaform() #8 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/toolset-forms/api.php(25): WPToolset_Forms_Bootstrap->field() #9 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields-post.php(277): wptoolset_form_field() #10 /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/admin.php(105): wpcf_add_meta_boxes() #11 /home/u46122p41645/domains/example.com/public_html/wp-includes/class-wp-hook.php(308): wpcf_admin_add_meta_boxes() #12 /home/u46122p41645/domains/example.com/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #13 /home/u46122p41645/domains/example.com/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #14 /home/u46122p41645/domains/example.com/public_html/wp-admin/includes/meta-boxes.php(1701): do_action() #15 /home/u46122p41645/domains/example.com/public_html/wp-admin/edit-form-advanced.php(271): register_and_do_post_meta_boxes() #16 /home/u46122p41645/domains/example.com/public_html/wp-admin/post.php(206): require('/home/u46122p41...') #17 {main} thrown in /home/u46122p41645/domains/example.com/public_html/wp-content/plugins/layouts/vendor/toolset/toolset-common/lib/adodb-time.inc.php on line 1048

Any thoughts on this? Thanks!

#2587965

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

Hello. Thank you for contacting the Toolset support.

This seems to be related the custom date field. Types stores custom date field value as Unix Timestamp but you must have added the date as date string.

Can you please share problem URL where I can see the issue as well as admin access details.

*** 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.

#2588187

Minesh
Supporter

Languages: English (English )

Timezone: Asia/Kolkata (GMT+05:30)

As suspected the date value is added as date string as you can see with the following screenshot: hidden link

Toolset custom date field value stored in postmeta table and the date custom field value is stored as Unix Timestamp. So what you have to to is:
- either delete those postmeta entries for custom fields and once you see post is working set the date value again from edit post screen OR
- get the date custom field value from postmeta table and convert that date string to equivalent Unix Timestamp and replace with your existing date string