I have a form for adding content into a CPT. It hasn't worked for a while. It used to work for a few years, then stopped.
Please take a look at hidden link and let me know if the error is throwing any clues.
I currently have only Toolset plugins active on this staging site.
Thank you.
Hello,
I have checked the URL you mentioned above:
hidden link
I can only see message: It Looks Like You’re Not Logged In…
What error message did you get?
And please check if there is any PHP errors in your website, you can follow our document to get the PHP debug logs:
https://toolset.com/documentation/programmer-reference/debugging-sites-built-with-toolset/#php-debugging
section "PHP Debugging"
My mistake. I forgot the obvious issue of needing to be logged in. Below is the error.
I've added an admin user account for Toolset.
toolset.support
Gmm#3h4fXIpdcBLuq
I'll look into PHP errors, too.
Fatal error: Uncaught TypeError: abs(): Argument #1 ($num) must be of type int|float, string given in /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/lib/adodb-time.inc.php:1048 Stack trace: #0 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/lib/adodb-time.inc.php(1048): abs() #1 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields/date/functions.php(380): adodb_date() #2 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields/date/functions.php(324): wpcf_fields_date_convert_timestamp_to_datepicker() #3 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/types/vendor/toolset/types/embedded/includes/fields/date.php(316): wpcf_fields_date_value_check() #4 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/class-wp-hook.php(308): wpcf_fields_date_value_get_filter() #5 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #6 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/classes/class.field_factory.php(92): apply_filters() #7 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/classes/class.date.php(59): FieldFactory->getValue() #8 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/classes/class.form_factory.php(309): WPToolset_Field_Date->metaform() #9 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/bootstrap.php(66): FormFactory->metaform() #10 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/toolset-forms/api.php(25): WPToolset_Forms_Bootstrap->field() #11 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/controllers/form_rendering.php(846): wptoolset_form_field() #12 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/models/field/field.php(132): CRED_Form_Rendering->renderField() #13 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/controllers/field_factory.php(7): CRED_Field->get_field() #14 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/controllers/form_rendering.php(337): CRED_Field_Factory::create_field() #15 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/common/Shortcode_Parser.php(156): CRED_Form_Rendering->cred_field_shortcodes() #16 [internal function]: CRED_Shortcode_Parser->do_shortcode_tag() #17 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/common/Shortcode_Parser.php(114): preg_replace_callback() #18 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/models/form/post.php(287): CRED_Shortcode_Parser->do_shortcode() #19 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/models/form/base.php(399): CRED_Form_Post->build_form() #20 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/application/controllers/form_builder_base.php(44): CRED_Form_Base->print_form() #21 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CRED_Helper.php(1799): CRED_Form_Builder_Base->get_form() #22 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/library/toolset/cred/embedded/classes/CRED_Helper.php(2398): CRED_Helper::cred_form() #23 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/shortcodes.php(355): CRED_Helper::credFormShortcode() #24 [internal function]: do_shortcode_tag() #25 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/shortcodes.php(227): preg_replace_callback() #26 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/class-wp-hook.php(308): do_shortcode() #27 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/plugin.php(205): WP_Hook->apply_filters() #28 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/post-template.php(255): apply_filters() #29 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/themes/genesis/lib/structure/post.php(486): the_content() #30 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/class-wp-hook.php(308): genesis_do_post_content() #31 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #32 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #33 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/themes/genesis/lib/structure/loops.php(119): do_action() #34 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/themes/genesis/lib/structure/loops.php(38): genesis_standard_loop() #35 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/class-wp-hook.php(308): genesis_do_loop() #36 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters() #37 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/plugin.php(517): WP_Hook->do_action() #38 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/themes/genesis/lib/framework.php(66): do_action() #39 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/themes/genesis/page.php(15): genesis() #40 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-includes/template-loader.php(106): include('/home/769127.cl...') #41 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-blog-header.php(19): require_once('/home/769127.cl...') #42 /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/index.php(17): require('/home/769127.cl...') #43 {main} thrown in /home/769127.cloudwaysapps.com/kvtnfdmmtp/public_html/wp-content/plugins/cred-frontend-editor/vendor/toolset/toolset-common/lib/adodb-time.inc.php on line 1048
Additional notes:
I get an error trying to edit the page where the form is placed:
hidden link
Errors appear to point to date / date picker (for Remove Date field).
If I make the "Remove Date" field (in the "Job Posting Status" post field group) not required and then delete it from the form, the form appears to work.
Thanks for the details, you are right the problem is default value of the custom date field "Remove Date"
hidden link
Toolset custom date field stores value in timestamp format, you will need to setup the default value in timestamp format too, see my screenshot Remove-Date.jpg
You can get the timestamp value with some other tools, for example:
hidden link