Error Searching for Youtube Video

Re: Error Searching for Youtube Video

by Shin Hiorie -
Number of replies: 4


 Hi Halen,

 I'm using 2.8.1, however I've made a custom patching to the code to support the youtube API. Its  working fine after the patching ( somewhere in 1st quarter of the year if i'm not mistaken )

 Got no clue from web error log. Would it show any clue if I turn on the debugging ? Seems this is  from filepicker.

 Tq for your time.

 a

In reply to Shin Hiorie

Re: Error Searching for Youtube Video

by Shin Hiorie -


 Hi All,

 Turn on the debugger mode I got the below stack trace error message. ( refer attachment )

 I've check the code in repository/youtube/lib.php line 194 as below :

188         } catch (Google_Service_Exception $e) {
189             // If we throw the google exception as-is, we may expose the apikey
190             // to end users. The full message in the google exception includes
191             // the apikey param, so we take just the part pertaining to the
192             // actual error.
193             $error = $e->getErrors()[0]['message'];
194             throw new moodle_exception('apierror', 'repository_youtube', '', $error);
195         }
196         return $list;

when i've change the 193 line to $error = $e->getMessage(); the error dialog return Invalid json in service response: ( refer attachment )

Appreciate your guide guys.

* I think this thread in wrong category ... I saw Repository category just now .. sorry for this.


Tq

Attachment youtuberepo.jpg
In reply to Shin Hiorie

Re: Error Searching for Youtube Video

by Helen Foster -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Sorry I can't help with the debugging message, however I have moved the discussion thread into the Repositories forum.

In reply to Shin Hiorie

Re: Error Searching for Youtube Video

by Shin Hiorie -


 Good Day All,

 Its seems that there issue with Google API connection. Does now Google API connection must be from  Google Client version 2.0 above ?

 My check my moodle current API client is 1.0.5-beta ( info from lib/google/readme_moodle.txt )

 Hoping you guys can give me some lights here.

 Tqvm