Forum

Thread tagged as: Problem, Error

Youtube video not now working

Adding video to page in new site now gives a number of errors (first)

( ! ) Warning: simplexml_load_string(): Entity: line 1: parser error : Start tag expected, '<' not found in C:\wamp\www\access\perch\addons\fieldtypes\youtube\youtube.class.php on line 227
Call Stack
#   Time    Memory  Function    Location
1   0.0000  252304  {main}( )   ..\index.php:0
2   0.0576  2987112 include( 'C:\wamp\www\access\perch\core\apps\content\modes\edit.pre.php' )  ..\index.php:22
3   0.0596  3071800 include( 'C:\wamp\www\access\perch\core\apps\content\modes\edit.form.pre.php' ) ..\edit.pre.php:62
4   0.0986  4980240 PerchContent_Util::read_items_from_post( )  ..\edit.form.pre.php:150
5   0.0986  4982240 PerchFieldType_youtube->get_raw( )  ..\PerchContent_Util.class.php:269
6   0.0986  4983480 PerchFieldType_youtube->get_details( )  ..\youtube.class.php:78
7   0.1596  4983824 simplexml_load_string ( )   ..\youtube.class.php:227

On previous site video displayed as expected (previous perch version). Updated older site to most recent version (same as current one giving error) and now adding new video gives same error.

Diagnostics report
HEALTH CHECK

Perch is up to date
PHP 5.5.12 is up to date
MySQL 5.6.17 is up to date
Image processing available
SUMMARY INFORMATION

Perch: 2.8.7, PHP: 5.5.12, MySQL: mysqlnd 5.0.11-dev - 20120503 - $Id: bf9ad53b11c9a57efdb1057292d73b928b8c5c77 $, with PDO
Server OS: WINNT, apache2handler
Installed apps: content (2.8.7), assets (2.8.7), categories (2.8.7)
App runtimes: <?php $apps_list = array( 'content', 'categories', );
PERCH_LOGINPATH: /perch
PERCH_PATH: C:\wamp\www\callanetics\perch
PERCH_CORE: C:\wamp\www\callanetics\perch\core
PERCH_RESFILEPATH: C:\wamp\www\callanetics\perch\resources
Image manipulation: GD
PHP limits: Max upload 64M, Max POST 3M, Memory: 128M, Total max file upload: 3M
Resource folder writeable: Yes
HTTP_HOST: callanetics.dev
DOCUMENT_ROOT: C:/wamp/www/callanetics
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Rob Willox

Rob Willox 0 points

  • 6 years ago
Rachel Andrew

Rachel Andrew 394 points
Perch Support

The YouTube Plugin doesn't currently work - as explained on the download page - as Google switched off the API. We're going to look at what we can do about that.

Apologies! Didn't read the documentation as had already downloaded and installed on other site and was working ok.

The video on other site still working ok, only when adding new video do you get the error.

Drew McLellan

Drew McLellan 2638 points
Perch Support

It's at the point of fetching the video details that the API is used, and as Rachel points out, Google have rather unhelpfully switched that API off.

We're in the process of moving it over to a new API, but it's unfortunately not a simple change to make.

That's great but been able to overcome the problem to an extent.

Using Foundation5 framework and it has a .flex-video class that displays video in an iframe and makes it responsive. Using a <perch:content> text field to drop in the video ref at the end of embed url and appears to be working fine: https://webmedia.webhop.biz/classes/

Drew,

when you fix this, could you please ensure that it fetches videos from //youtube.com... (rather than https://) so that secure sites can embed videos as well?

Drew McLellan

Drew McLellan 2638 points
Perch Support