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
I believe this may be a PHP issue - when I downgraded to PHP 7 this issue wasn't happening
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)
My issue is resolved now. Thank you!