Hello,
Just installed Phoca Gallery 4.3.0, running with Joomla 3.5.1.
I added several YouTube videos to different categories and found that Phoca normally creates an image file and thumbnails for the video during the import process. For some videos, however, Phoca is importing the video successfully but is not creating the image file and thumbnails.
For those video imports that don't work properly, the import process displays the "Data from YouTube successfully imported" message, the YouTube Link, Title, Description and Filename fields are populated correctly, and the loaded data is pasted into the new image form. When the Select Filename button is clicked, no thumbnails are generated, a list of files in the category directory is displayed, but the image file associated with the imported video is not present. A dummy filename must be entered in order to save the new image (video).
Afterwards the video appears in category view with no image but does load and play properly.
The YouTube API key is set correctly, YouTube SSL is enabled, and thumbnail generation is enabled. The image and thumbnail generation fails for the same imported videos in all combinations of http, https, regular and short URLS.
i'm thinking there must be a difference in the structure or content of those videos that import images successfully and those that do not, but I can't figure out what it is. I'm not sure why there are no error messages from Phoca on the import attempts that don't work.
Any thoughts on what might be happening or other things I might try would be appreciated. Thanks.
YouTube Import Does Not Always Create Image File and Thumbna
-
lurch177
- Phoca Newbie

- Posts: 3
- Joined: 22 Jun 2016, 19:05
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: YouTube Import Does Not Always Create Image File and Thu
Hi,
When you test the video more times - to import - do you get always the same results? If yes, can you send me the link to such YouTube video, so I can test it on my test server?
Thank you, Jan
I think, this will be all OK, because if it works for some videos and some not, then this seems like there will be some error when connecting the YouTube server.The YouTube API key is set correctly, YouTube SSL is enabled, and thumbnail generation is enabled. The image and thumbnail generation fails for the same imported videos in all combinations of http, https, regular and short URLS.
When you test the video more times - to import - do you get always the same results? If yes, can you send me the link to such YouTube video, so I can test it on my test server?
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
lurch177
- Phoca Newbie

- Posts: 3
- Joined: 22 Jun 2016, 19:05
Re: YouTube Import Does Not Always Create Image File and Thu
Hi Jan,When you test the video more times - to import - do you get always the same results? If yes, can you send me the link to such YouTube video, so I can test it on my test server?
Yes, image and thumbnail generation always get the same results with the same videos. I think it is connecting to the YouTube server OK, all videos playback properly, even those for which Phoca does not generate the image and thumbnails when imported.
Video import that works properly (image and thumbnails generated): https://www.youtube.com/watch?v=1U6XDHgFX_U
Video import that does not work properly (no image or thumbnail generated): https://www.youtube.com/watch?v=pwP_aJTsQB8
Thank you for looking at this.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: YouTube Import Does Not Always Create Image File and Thu
Hi, thank you for the links, yes, confirmed, seems like some variables changed for some videos in YouTube (from "standard" to "default"
)
Changed in code, please download this file:
https://www.phoca.cz/forumfiles/pgytb.zip
and upload both files to your server:
phocaselectytb.php --> to folder --> administrator\components\com_phocagallery\models\fields\
youtube.php --> to folder --> administrator\components\com_phocagallery\libraries\phocagallery\youtube\
Let me know if it works OK for you.
Thank you, Jan
Changed in code, please download this file:
https://www.phoca.cz/forumfiles/pgytb.zip
and upload both files to your server:
phocaselectytb.php --> to folder --> administrator\components\com_phocagallery\models\fields\
youtube.php --> to folder --> administrator\components\com_phocagallery\libraries\phocagallery\youtube\
Let me know if it works OK for you.
Thank you, Jan
If you find Phoca extensions useful, please support the project
-
lurch177
- Phoca Newbie

- Posts: 3
- Joined: 22 Jun 2016, 19:05
Re: YouTube Import Does Not Always Create Image File and Thu
Hello Jan,
The modified code did resolve the problem, I now get an image file and thumbnails when I import https://www.youtube.com/watch?v=pwP_aJTsQB8,
The image file is smaller than other imports, however, 120x90 pixels. It appears that you downloaded the default.jpg thumbnail from YouTube. Would the larger sddefault.jpg have been a better choice to be consistent with other imports?
Either way, thank you for looking at this, the fast response and resolution of the issue. Excellent product support.
The modified code did resolve the problem, I now get an image file and thumbnails when I import https://www.youtube.com/watch?v=pwP_aJTsQB8,
The image file is smaller than other imports, however, 120x90 pixels. It appears that you downloaded the default.jpg thumbnail from YouTube. Would the larger sddefault.jpg have been a better choice to be consistent with other imports?
Either way, thank you for looking at this, the fast response and resolution of the issue. Excellent product support.
- Jan
- Phoca Hero

- Posts: 49144
- Joined: 10 Nov 2007, 18:23
- Location: Czech Republic
- Contact:
Re: YouTube Import Does Not Always Create Image File and Thumbna
Ok, thank you for the info, I will take a look at it.
Jan
Jan
If you find Phoca extensions useful, please support the project