• Resolved Jerome Lopez

    (@jeromelopez)


    Hi,
    I connected my website to the Helloasso api. The test works. I received a json file with the subscribers of Helloasso.
    When I try to launch the wp users’ creation, it works the first time (on the log file):

    2022-09-03 23:57:46 :: <strong>Utilisateur créé pour l'adresse ******** :</strong> id n°2</br>
    
    2022-09-03 23:57:46 :: Echec de la création du compte pour l'adresse **********</br>

    But after it doesn’t work any more. When I put the debug mode on my website, I get this error:

    Notice: Undefined index: class in /home/rvsegaq/www/wp-content/plugins/helloadherents/functions/settings-page.php on line 811
    
    Notice: Undefined index: class in /home/rvsegaq/www/wp-content/plugins/helloadherents/functions/settings-page.php on line 812
    
    Notice: Undefined index: class in /home/rvsegaq/www/wp-content/plugins/helloadherents/functions/settings-page.php on line 813
    
    Notice: Undefined index: class in /home/rvsegaq/www/wp-content/plugins/helloadherents/functions/settings-page.php on line 814
    
    Notice: Undefined index: class in /home/rvsegaq/www/wp-content/plugins/helloadherents/functions/settings-page.php on line 815
    
    Notice: Undefined index: class in /home/rvsegaq/www/wp-content/plugins/helloadherents/functions/settings-page.php on line 801

    On those lines I have this function:

       foreach ( (array) $wp_settings_fields[ $page ][ $section['id'] ] as $field ) {
    
                if ($field['args']['class'] == 'options_group') {
                    echo ('<div class="options_group">' . esc_html($field['title']));
                    call_user_func( $field['callback'], $field['args'] );
                    echo "<div id='content_options_group'>";
                } else {
                    echo '<div style="width:100%;"><div class="ha_option_label">' . wp_kses_post($field['title']) . '</div><div class="ha_option_input">';
                    call_user_func( $field['callback'], $field['args'] );
                    echo '</div></div>';
                }
    
                if ($field['args']['class'] == 'test_ha_after') {echo "<br>"; helladh_test_api_ha();}
                if ($field['args']['class'] == 'test_google_after') {echo "<br>"; helladh_test_api_google(); echo "</div></div>";}            
                if ($field['args']['class'] == 'test_mailchimp_after') {echo "<br>"; helladh_test_api_mailchimp(); echo "</div></div>";}            
                if ($field['args']['class'] == 'test_wordpress_users_after') {echo "<br>"; helladh_test_wordpress_users(); echo "</div></div>";}            
                if ($field['args']['class'] == 'test_custom_function_after') {echo "<br>"; helladh_test_custom_function(); echo "</div></div>";}            
    
            }

    I’m using your last plugin 1.2 and my wordpress is 6.0.2.
    Did you see sometime this kind of error?
    Thank you for your help.
    Jérôme Lopez

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thread Starter Jerome Lopez

    (@jeromelopez)

    I tried to uninstall and install again the plugin but nothing changed. I forgot to tell you that the PHP version of my OVH (hébergement mutualisé) is 7.4

    Thread Starter Jerome Lopez

    (@jeromelopez)

    I managed to log the wp error on wordpress_users.php if is_wp_error($user_id):

     $error_code = array_key_first( $user_id->errors );
    	        $error_message = $user_id->errors[$error_code][0];
               // $log = wp_kses_post("Echec de la création du compte pour l'adresse" . $adh['mail'] . '</br>'); 
                $log = wp_kses_post("Echec de la création du compte pour l'adresse" . $error_message . '</br>'); 

    I found the erro it was due that I didn’t use the good “Identifiant”.
    It should be mail and not email.
    Sorry to waste your time

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Error on the users’ creation’ is closed to new replies.