Youtube video adding bug

Phoca Gallery - image gallery extension
serge
Phoca Newbie
Phoca Newbie
Posts: 1
Joined: 22 Jul 2015, 02:47

Youtube video adding bug

Post 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. :)
User avatar
Jan
Phoca Hero
Phoca Hero
Posts: 49144
Joined: 10 Nov 2007, 18:23
Location: Czech Republic
Contact:

Re: Youtube video adding bug

Post 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
If you find Phoca extensions useful, please support the project
Post Reply