Also I forgot to mention - please download the child theme's functions.php file from the server so you have the latest version to work from.
What kid's theme are you talking about ?
I mean the "Luca" theme, I assumed it is a child but I may be wrong.
I have reloaded the last file in luca theme but it still does not work.
Here is the code :
add_action('cred_save_data', 'my_save_data_action',10,2);
function my_save_data_action($post_id, $form_data)
{
if ($form_data['id']==62)
{
$userid = $post_id;
$user_info = get_userdata($userid);
$prenom = $user_info->first_name;
$nom = $user_info->last_name;
$email = $user_info->user_email;
$my_post = array(
'post_title' => $prenom,
'post_status' => 'publish',
'post_author' => $post_id,
'post_type' => 'auteur',
'meta_input' => array(
'wpcf-type' => $_POST['type'],
'wpcf-prenom' => $prenom,
'wpcf-nom' => $nom,
'wpcf-societe' => $_POST['societe'],
'wpcf-telephone' => $_POST['telephone'],
'wpcf-email' => $email,
'wpcf-site-web' => $_POST['site-web']
)
);
wp_insert_post( $my_post );
}
}
You overwrote the functions.php file I modified. I have replaced functions.php on the server. You should now DOWNLOAD the updated functions.php file, NOT UPLOAD your own version. This will overwrite the fixed code.
ok, sorry, I did not understand it like that
I tried again but it still does not work on hidden link
I just tested and again, it worked for me. The User was created successfully, and the Auteur TS16 was also created successfully. Screenshots attached.
It's incomprehensible, I just tested on two other machines and it does not work at home and it does not work at my colleague's office. Can this come from the browser? Are you logging in to the admin when you sign in a new user? I don't understand why it works for you and not for me and my colleague.
If I go to /wp-admin I see a login form, so I am not logged in. I just tried to validate your site using the W3C's validator tool here: https://validator.w3.org/
Check the error message here in the screenshot - it says there is a DNS issue with this URL.
I got the following unexpected response when trying to retrieve <<em><u>hidden link</u></em>;:
500 Can't connect to luca.graphisteriegenerale.com:443 (hostname verification failed)
If you made recent changes to your domain name (DNS) configuration, you may also want to check that your domain records are correct, or ask your hosting company to do so.
It could be that when you test, you're getting an old version from an old server because the DNS isn't right? I really don't know, troubleshooting server issues is not something I do very much. Without being able to write to the logs, I can't debug the code, either. Can you check with your hosting company to see how to write to a server log from PHP, and where to find that log?
Quick question - what "Type" are you choosing when you test? I have been using "Architecte", so I don't know if that could be the difference.
I tested with architect and it's the same.
Okay let me know what you find out about logs, and also let me know if we can get a valid security certificate on this site. If not, we should probably not test with HTTPS.
It's the same problem with : hidden link
I transferred the site to another server with a valid https certificate. I edited my previous message with access information.
Unfortunately, I still have the same problem.
The form is on this page: hidden link
I tested with the basic themes of wordpress but it's always the same thing.
Hi Christian,
I just found where the problem comes from.
When I integrate the form directly in the page, it works very well but when I integrate the form in a view that I then integrate in the page, it does not work anymore but I need to do it with the view. How to make it work with view ?
Thanks
My issue is resolved now. Thank you!