Still the same 🙁
hidden link
Turned on Logging.. To screen and file..
Soo..
[24-Sep-2018 21:58:48 UTC] PHP Notice: Trying to get property of non-object in /nas/content/staging/bfsf/wp-content/plugins/types-access/includes/Helper.php on line 1604
[24-Sep-2018 21:59:05 UTC] PHP Notice: Trying to get property of non-object in /nas/content/staging/bfsf/wp-content/themes/bb-theme-child/functions.php on line 73
Line 73 of functions.php is :
if ( 'application' == $post->post_type ) {
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Gerard,
I see the issue. Its atually a problem with how the post type is being retrieved from the array.
function gg_fill_full_name( $post_id, $form_data ){
if ($form_data['post_type'] == 'application' ) {
$firstname = get_post_meta( $post_id, 'wpcf-first-name', true );
$middlename = get_post_meta( $post_id, 'wpcf-middle-name', true );
$lastname = get_post_meta( $post_id, 'wpcf-last-name', true );
$suffix = get_post_meta( $post_id, 'wpcf-name-suffix', true );
$result = $lastname . " " . $suffix . ", " . $firstname . " " . $middlename;
if ( !empty($result) ) {
$my_post = array(
'ID' => $post_id,
'post_title' => $result,
);
// Update the post into the database
wp_update_post( $my_post, $wp_error );
}
}
}
add_action('cred_save_data', 'gg_fill_full_name',10,2);
Please try the above.
Thanks,
Shane
Hi,
Good try, but now it fails on creating the form. Seems to be having an issue with the file upload.. hidden link
There was a file missing message when I hovered over the file area earlier.
BUT, the forms did upload and the files too.. Same title problem as before.
hidden link
So why that message?
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Gerard,
Would you mind allowing me to have admin access to the site so that i can take a further look at this ?
The private fields have been enabled.
Also please let me know the page that the form is on so that I can test it as well.
Thanks,
Shane
OOps I forgot the link to the forms page. You'll see though, it's simple to find 😉
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Gerard,
It seems that the hook is causing the form not to fully submit when using AJAX.
I disabled the AJAX submission and now the form and custom hook should be working fine.
Please let me know if this helps.
Thanks,
Shane
YES!!!
Why were there no errors or indications though? 🙁
But it's ok, AJAX is not required in this case..
Thanks!
Shane
Supporter
Languages:
English (English )
Timezone:
America/Jamaica (GMT-05:00)
Hi Gerard,
I'm sure there was an error being thrown somewhere for it, but i'm not sure how to debug for the error.
So i'm not able to say what the error is but it is a known issue on our side.
Thanks,
Shane
My issue is resolved now. Thank you!
Shame about the AJAX bug, but it'll have to do.
Is there a thread or forum we can follow somewhere about these bugs to stay on top of things and avoid week long troubleshooting when possible?
Thanks