Page 1 of 1

Youtube video adding bug

Posted: 22 Jul 2015, 03:00
by serge
Hi. Theres a bug in youtube.php.

I tried adding video from youtube, pasted link and pressed import. Message said "import successful" but no title and thumbnail name appeared. I've rechecked api key it was set ok.

So the bug is that PhocaGalleryYoutube -> importYtb acts OK even if theres an error returned from API. I got error

Code: Select all

{
 "error": {
  "errors": [
   {
    "domain": "usageLimits",
    "reason": "ipRefererBlocked",
    "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed.",
    "extendedHelp": "https://console.developers.google.com"
   }
  ],
  "code": 403,
  "message": "There is a per-IP or per-Referer restriction configured on your API key and the request does not match these restrictions. Please use the Google Developers Console to update your API key configuration if request from this IP or referer should be allowed."
 }
}
And there was "success" message even if no thumb or description created. After removing api restriction information added OK.

Expected: error message appears in case of API error.

Also seen earlier same probles messages with no solution in forum. Big thanks for powerful and free gallery. :)

Re: Youtube video adding bug

Posted: 23 Jul 2015, 12:19
by Jan
Hi, thank you for the info, I will take a look at it (to handle error messages when getting them from API)

Thank you, Jan