• Resolved King Ding

    (@dazzerr)


    I keep getting a critical error on import ?? I’m only trying to import one user… Please see error below. Thanks!

    Notice: Array to string conversion in /public_html/wp-content/plugins/import-users-from-csv-with-meta/classes/helper.php on line 270
    
    Notice: Array to string conversion in /public_html/wp-content/plugins/import-users-from-csv-with-meta/classes/helper.php on line 270
    
    Recoverable fatal error: Object of class stdClass could not be converted to string in /public_html/wp-content/plugins/import-users-from-csv-with-meta/classes/helper.php on line 270
    There has been a critical error on this website. Please check your site admin email inbox for instructions.
Viewing 12 replies - 16 through 27 (of 27 total)
  • Thread Starter King Ding

    (@dazzerr)

    I am very familiar with PHP actually Javier, and have made many successful plugins of my own. I just don’t understand what variable you are referring to inn this case exactly.

    Plugin Author Javier Carazo

    (@carazo)

    OK so I need to know which is the value of the variable where throws the error:

    For example if you have this error:

    Recoverable fatal error: Object of class stdClass could not be converted to string in /public_html/wp-content/plugins/import-users-from-csv-with-meta/classes/helper.php on line XXX

    I need to know creating it in helper.php on line XXX

    Thread Starter King Ding

    (@dazzerr)

    I see. I figured that you might be able to see this yourself, since you would have wrote the code?

    This particular function closes at the line quoted in my error code at the beginning of the thread (220): https://bit.ly/2Sy65cr

    Is that what you need?

    Plugin Author Javier Carazo

    (@carazo)

    No. I need the value of the variable who throws the error.

    Thread Starter King Ding

    (@dazzerr)

    Ok Javier, maybe it’s simpler if I provide you with temporary login credentials so that you can take a peek?

    Plugin Author Javier Carazo

    (@carazo)

    No, you cannot. This would violate the forum guidelines.

    You told me you know to code in PHP so it would be really easy for you to tell which is the value of the variable who has the problem here:

    Recoverable fatal error: Object of class stdClass could not be converted to string in /public_html/wp-content/plugins/import-users-from-csv-with-meta/classes/helper.php on line 270
    There has been a critical error on this website. Please check your site admin email inbox for instructions.
    

    The line would have change because of updates so look at the error in the new line and tell me where the object to string conversion appears and I fix it.

    Thread Starter King Ding

    (@dazzerr)

    Here’s a note from the error log in case that helps?

    2021/07/01 05:59:48 [error] 15481#15481: *7861 FastCGI sent in stderr: "PHP message: PHP Recoverable fatal error: Object of class stdClass could not be converted to string in /www/site_309/public/wp-content/plugins/import-users-from-csv-with-meta/classes/helper.php on line 278" while reading upstream, client: 49.197.45.14, server: www.site.com, request: "POST /wp-admin/tools.php?page=acui HTTP/1.0", upstream: "fastcgi://unix:/var/run/php7.3-fpm-site.sock:", host: "www.site.com", referrer: "https://www.site.com/wp-admin/tools.php?page=acui"

    And some more error data:

    Notice: update_user_meta( $user_id, 'last_activity' ) was called incorrectly. User last_activity data is no longer stored in usermeta. Use bp_update_user_last_activity() instead. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /www/site_309/public/wp-includes/functions.php on line 5313

    Notice: get_user_meta( $user_id, 'last_activity' ) was called incorrectly. User last_activity data is no longer stored in usermeta. Use bp_get_user_last_activity() instead. Please see Debugging in WordPress for more information. (This message was added in version 2.0.0.) in /www/site_309/public/wp-includes/functions.php on line 5313

    • This reply was modified 3 years, 5 months ago by King Ding. Reason: more logs
    Plugin Author Javier Carazo

    (@carazo)

    No… this is the same.

    I need the same I asked you the first time: the content of the variable who throws the error.

    If you know PHP it is easy for you to do a var_export and show me it here.

    Thread Starter King Ding

    (@dazzerr)

    I’m sorry Javier, I know this thread has been tedious for you. I write and read PHP in WordPress, but I’m not familiar with var_export – perhaps because of my lack of formal training.

    I’m lost and running out of options, so maybe it’s best if I just move on from this and accept defeat.

    Despite our unsuccessful efforts, I do appreciate your time, prompt cooperation, and service thus far. Thank you!

    If I happen to be able to provide you with the info you need, then I’ll be sure to let you know..

    Plugin Author Javier Carazo

    (@carazo)

    @dazzerr, I did an update trying to fix it…

    If you know the content of the variable, we can do a conditional to fix it.

    Waiting for it.

    Thread Starter King Ding

    (@dazzerr)

    elseif( is_array( $element ) ){
    $element_string = '';
    $i = 0;

    ?
    ?These variable are just being set here, so I’m not sure what you’re looking for Javier :/ If you could send some specific instructions then that would be helpful.

    Plugin Author Javier Carazo

    (@carazo)

    No, please take a look in the line the current version throw the error and do a var_export of the variable.

Viewing 12 replies - 16 through 27 (of 27 total)
  • The topic ‘Critical error on import’ is closed to new replies.