• Resolved lisota

    (@lisota)


    We have installed and activated this plugin today, but are experiencing errors (500) when we add or edit a post in wp-admin.

    Specifically,

    PHP Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘Method expects this value \n—-

    wp-content/plugins/fb-instant-articles/vendor/facebook/facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Validators/Type.php on line 176

    I’ve redacted some of the author details, but it is showing a WP author object in between those two sections. Happy to send the full log somewhere, as I don’t want to include site details here.

    https://www.ads-software.com/plugins/fb-instant-articles/

Viewing 7 replies - 1 through 7 (of 7 total)
  • Plugin Author diegoquinteiro

    (@diegoquinteiro)

    Plugin Author diegoquinteiro

    (@diegoquinteiro)

    Hi lisota,

    Can you paste the full log here and replace your content with fake content for privacy? It is hard to debug without more info.

    Thread Starter lisota

    (@lisota)

    PHP Fatal error: Uncaught exception ‘InvalidArgumentException’ with message ‘Method expects this value \n—-[\nobject(stdClass)#858 (9) {\n [“ID”]=>\n int(3)\n [“display_name”]=>\n string(11) “Bob Smith”\n [“first_name”]=>\n string(4) “Bob”\n [“last_name”]=>\n string(6) “Smith”\n [“user_login”]=>\n string(4) “bobs”\n [“user_nicename”]=>\n string(4) “bobsmith”\n [“user_email”]=>\n string(17) “[email protected]”\n [“user_url”]=>\n string(25) “https://www.mysite.com/”\n [“bio”]=>\n string(373) “Bob Smith’s bio here”\n}\n]—-\n to be one of the types \n====[\nstring(40) “Facebook\\InstantArticles\\Elements\\Author”\n]====’ in /nas/content/live/mysite/wp-content/plugins/fb-instant-articles in /nas/content/live/mysite/wp-content/plugins/fb-instant-articles/vendor/facebook/facebook-instant-articles-sdk-php/src/Facebook/InstantArticles/Validators/Type.php on line 176, referer: https://www.mysite.com/wp-admin/post.php?post=243514&action=edit

    Thread Starter lisota

    (@lisota)

    My current suspicion is a conflict with Co-Authors Plus. I have to test more to confirm.

    I have the same issue, and also use the Co-Authors Plus plugin, so that seems like the likely culprit.

    It seems like a user object is returned somewhere instead of just a string with the name, if I’m interpreting this correctly.

    <b>Fatal error</b>:  Uncaught exception 'InvalidArgumentException' with message 'Method expects this value
    ----[
    object(stdClass)#3798 (9) {
      [&quot;ID&quot;]=>
      int(41)
      [&quot;display_name&quot;]=>
      string(12) &quot;Test&quot;
      [&quot;first_name&quot;]=>
      string(12) &quot;Test&quot;
      [&quot;last_name&quot;]=>
      string(0) &quot;&quot;
      [&quot;user_login&quot;]=>
      string(11) &quot;Test&quot;
      [&quot;user_nicename&quot;]=>
      string(11) &quot;Test&quot;
      [&quot;user_email&quot;]=>
      string(21) &quot;[email protected]&quot;
      [&quot;user_url&quot;]=>
      string(0) &quot;&quot;
      [&quot;bio&quot;]=>
      string(0) &quot;&quot;
    }
    ]----
     to be one of the types
    ====[
    string(40) &quot;Facebook\InstantArticles\Elements\Author&quot;
    ]===='
    Plugin Author diegoquinteiro

    (@diegoquinteiro)

    Hi guys,

    That was fixed in 2.7. Thanks for reporting!

    The co-authors plugin should also be working seamlessly.

    That was quick. Many thanks!

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘PHP Fatal error: Uncaught exception 'InvalidArgumentException' in Type.php’ is closed to new replies.