Skip Navigation

[Resolved] Cred user form

This support ticket is created 5 years, 3 months ago. There's a good chance that you are reading advice that it now obsolete.

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.

Sun Mon Tue Wed Thu Fri Sat
8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 8:00 – 12:00 - -
13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 13:00 – 17:00 - -

Supporter timezone: America/New_York (GMT-04:00)

This topic contains 44 replies, has 2 voices.

Last updated by olivierF 5 years, 3 months ago.

Assisted by: Christian Cox.

Author
Posts
#1312615

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.

#1312621

What kid's theme are you talking about ?

#1312623

I mean the "Luca" theme, I assumed it is a child but I may be wrong.

#1312625

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 );
    }
}
#1312629

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.

#1312653

ok, sorry, I did not understand it like that

I tried again but it still does not work on hidden link

#1312657
Screen Shot 2019-08-08 at 3.14.23 PM.png
Screen Shot 2019-08-08 at 3.15.50 PM.png
Screen Shot 2019-08-08 at 3.14.32 PM.png

I just tested and again, it worked for me. The User was created successfully, and the Auteur TS16 was also created successfully. Screenshots attached.

#1312689

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.

#1312693
Screen Shot 2019-08-08 at 3.38.11 PM.png

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.

#1312703

I tested with architect and it's the same.

#1312705

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.

#1312749

It's the same problem with : hidden link

#1312899

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.

#1312909

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

#1314491

My issue is resolved now. Thank you!