Skip Navigation

[Resolved] Unable to edit one custom post type, but other all ok to edit

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.

No supporters are available to work today on Toolset forum. Feel free to create tickets and we will handle it as soon as we are online. Thank you for your understanding.

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/Hong_Kong (GMT+08:00)

This topic contains 3 replies, has 2 voices.

Last updated by adamG-6 2 years ago.

Assisted by: Luo Yang.

Author
Posts
#2486303

I am trying to:

I have a couple of custom post types, i.e. "jobs" and "academic jobs". I can edit all of the "academic job" posts but when trying to edit any "job" post a fatal error appears.

I have switched off all the plugins, increased PHP memory, reinstalled WordPress and reverted to a standard WordPress theme, but no fix found.

Debug shows:

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

#2486327

I believe this may be a PHP issue - when I downgraded to PHP 7 this issue wasn't happening

#2486655

Hello,

I have tried these in your website:
Create a new job post:
hidden link
It works fine, and can be edited without any problem.

How do you setup those problem job posts?
Are you using other plugins to import them?
If it is, please make sure you are using valid data for those posts, especially those number and date fields:
- Minimum Salary
- Maximum Salary
- Closing date(Toolset custom date field stores value in timestamp format, for example: 1667288233)

#2488587

My issue is resolved now. Thank you!