Forum
Not showing Embedded YouTube Video
I have recently upgraded to Perch 2 to get the YouTube feature working however, it appears that Perch is simply passing the URL on the article post and not embedding the video and displaying.
Help and advice sought please...
Can you post your template please?
Hi Rachel,
As follows:
I've just tested it with this exciting video about putting a bike into a box: https://www.youtube.com/watch?v=m5kldjYzGUA
Does that video work for you? (Video permissions can make a difference.)
Does your server have cURL enabled?
How Ironic! I know personally Daniel Lloyd from past cycling events!
Sadly no, changing to this video did not cure it and it is still simply just showing the URL rather than the embedded video itself.
Yes, curl is enabled on the server.
Shall we engage in a private ticket so that I can send you the client specific information for you to view?
Can you try turning debug on first? Add the following line to your
perch/config/config.php
file.And then let me know what it outputs at the bottom of the edit page after adding the YouTube URL and submitting the form?
(Daniel and the GCN team are great - love their videos!)
Daniel truly knows how to ride and to party!! #TE2013
I have just posted the part in relation to this event as there are many posts on the page.
INSERT INTO perch2_content_index (itemID, regionID, pageID, itemRev, indexKey, indexValue) VALUES (42,6,1,31,'title',''),(42,6,1,31,'date','7 April 2014'),(42,6,1,31,'location',''),(42,6,1,31,'video','https://www.youtube.com/watch?v=m5kldjYzGUA'),(42,6,1,31,'body',' '),(42,6,1,31,'body_raw','?'),(42,6,1,31,'body_processed',' '),(42,6,1,31,'order','16'),(42,6,1,31,'_id',42),(42,6,1,31,'_order','1015') OPTIMIZE TABLE perch2_content_index UPDATE perch2_pages SET pageModified='2014-06-25 12:36:09' WHERE pageID=1 SELECT * FROM perch2_content_items WHERE regionID='6' AND itemRev=31 ORDER BY itemOrder ASC
Queries: 298
Daft question, but you have installed the YouTube fieldtype, right?
https://grabaperch.com/add-ons/field-types/youtube
youtube.class.php... yep!
And that's at
/perch/addons/fieldtypes/youtube/youtube.class.php
?Yes, although mine is renamed from perch/ to:
Just realised mine is: cms/addons/fieldtypes/youtube.class.php
Changed to: cms/addons/fieldtypes/youtube/youtube.class.php ?
Just re-saved the page in the admin and its now working!
What changed between it working and not working?
As expected, was my error...
Realised mine is: cms/addons/fieldtypes/youtube.class.php
Changed to: cms/addons/fieldtypes/youtube/youtube.class.php
Ah, gotchya. Great!
Thanks Scott. Same stupid mistake here as well. Got it fixed now :-)