Jump to content


These Forums Are Now Read-Only


For TubePress support, please post a question here or open a support ticket and we will be glad to assist.


Photo

Suddenly, getting a fatal error


  • Please log in to reply
14 replies to this topic

#1 Mike Jonas

Mike Jonas

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 27 February 2012 - 06:48 PM

Fatal error: Cannot use object of type stdClass as array in /(path-to)/tubepress-pro/sys/classes/org/tubepress/impl/factory/commands/VimeoFactoryCommand.class.php on line 164

It was working fine until recently on both my production site and localhost. I didn't make any changes to the site, it just suddenly stopped working. This was the php code I was using to call tube press:

print TubePressPro::getHtmlForShortcode("vimeoKey='(my vimeo key)' vimeoSecret='(my secret key)' tubepress mode='vimeoUploadedBy' vimeoUploadedByValue='(myaccount)' embeddedWidth='960' embeddedHeight='540' thumbHeight='195' thumbWidth='315' hqThumbs='true' playerColor='44c8ff' cacheEnabled='true' uploaded='true' relativeDates='true' orderBy='published' playerColor='e63c3f'");

Any ideas?

#2 Laura Davis

Laura Davis

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 27 February 2012 - 08:10 PM

Same problem here. Was working just fine and now getting the exact same error. Didn't change anything. Any ideas? My shortcode is [tubepress]. I even tried changing the user from which I'm getting the videos and that didn't matter.

http://providencecc....est-vimeo-page/

#3 Mike Jonas

Mike Jonas

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 27 February 2012 - 08:58 PM

Temporarily fixed it by changing the mode from vimeoUploadedByValue to vimeoSearch

#4 Kenny McNett

Kenny McNett

    Member

  • Members
  • PipPip
  • 17 posts

Posted 27 February 2012 - 09:01 PM

Same problem here, suddenly. I thought it was because I was cloning and migrating a site, but now I'm getting the error on both sites. Maybe there's something broken with vimeo's search api?

Except, I'm getting videos from an album ID#, and it's throwing the error.

#5 Kenny McNett

Kenny McNett

    Member

  • Members
  • PipPip
  • 17 posts

Posted 27 February 2012 - 09:11 PM

Also an error if I try to retrieve by channel. Any insights?

#6 Laura Davis

Laura Davis

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 27 February 2012 - 10:11 PM

Temporarily fixed it by changing the mode from vimeoUploadedByValue to vimeoSearch



I was able to "fix" the issue this way too, however, using this mode only pulls up 3 of the 6 videos that I have on Vimeo so it's not a workable solution for me. I tried all other modes and all of them throw a fatal error except the search mode.

#7 Kenny McNett

Kenny McNett

    Member

  • Members
  • PipPip
  • 17 posts

Posted 28 February 2012 - 01:19 AM

vimeo just rolled out a fat redesign. my guess is that's the culprit.

Posted Image

#8 < no first name > Neaga

< no first name > Neaga

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 28 February 2012 - 03:19 AM

Same error here. We are playing videos from albums. What can we do for now?

#9 Andy Charrington-Wilden

Andy Charrington-Wilden

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 28 February 2012 - 07:15 AM

Yup, im getting this too.....

#10 Andy Charrington-Wilden

Andy Charrington-Wilden

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 28 February 2012 - 08:29 AM

The way to fix this is to cast the _videoArray var as an array again. In whatever/wp-content/plugins/tubepress/sys/classes/org/tubepress/impl/factory/commands/VimeoFactoryCommand.class.php, you'll need to do this on lines 55 and 60. So the _preExecute function now looks like this

protected function _preExecute($feed)
    {
        $unserialized = org_tubepress_impl_factory_commands_AbstractFactoryCommand::_unserializePhpFeed($feed);

        if (isset($unserialized->video)) {
            $this->_videoArray = (array)$unserialized->video;
            return;
        }

        if (isset($unserialized->videos) && isset($unserialized->videos->video)) {
            $this->_videoArray = (array)$unserialized->videos->video;
            return;
        }
        $this->_videoArray = array();
    }

Try that.

:-)

Why the heck vimeo are messing around like that is crazy...

#11 Andy Charrington-Wilden

Andy Charrington-Wilden

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 28 February 2012 - 08:46 AM

Blog post about it here

http://fishcantwhist...-t...0zaj6A-NNG

:-)

#12 Laura Davis

Laura Davis

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 28 February 2012 - 09:03 AM

[quote name="fish"]The way to fix this is to cast the _videoArray var as an array again. In whatever/wp-content/plugins/tubepress/sys/classes/org/tubepress/impl/factory/commands/VimeoFactoryCommand.class.php, you'll need to do this on lines 55 and 60. So the _preExecute function now looks like this


That fixed the issue for me. THANKS!!!!!

#13 < no first name > Neaga

< no first name > Neaga

    Newbie

  • Members
  • Pip
  • 3 posts

Posted 28 February 2012 - 09:50 AM

thank you. yes it works now

#14 Kenny McNett

Kenny McNett

    Member

  • Members
  • PipPip
  • 17 posts

Posted 28 February 2012 - 07:54 PM

Thanks fish!

#15 eric

eric

    Lead Developer

  • TubePress Staff
  • 2787 posts

Posted 28 February 2012 - 09:36 PM

Blog post about it here

http://fishcantwhist...-t...0zaj6A-NNG

:-)


Thank you! I've committed this to git and it will go out officially with TubePress 2.4.0 which should be out later tonight. Afterwards I'll do some more investigating and figure out why vimeo decided to throw in this monkey wrench.