Forum
Vimeo fieldtype issue
I think I've seen something similar posted by others, but I can't seem to find the solution, so wonder if I'm doing something wrong. I want to use the Vimeo fieldtype to output the Vimeo embed code in part of my page, but it appears not to save the vimeo URL when it's input to the field in the Perch editor - when the page is saved, the editor field simply blanks the URL that has been input.
My template code is:
<div id="<perch:content id="projectname" />" class="reveal-modal large" data-reveal style="display: block; top: 50px; opacity: 1;">
<h3> <perch:content id="projecttitle" /></h3>
<div class="flex-video widescreen vimeo" style="display: block;">
<perch:content id="video" type="vimeo" output="embed" label="Vimeo video URL" width="1200" />
</div>
<a class="close-reveal-modal">×</a>
</div>
but when inputting a Vimeo URL via the Perch editor and saving the page, the URL field simply returns as empty in the editor (despite the page saying it's saved properly) and the output code is as follows, with an empty space where the Vimeo embed should be:
<div id="shamelessopening" class="reveal-modal large" data-reveal style="display: block; top: 50px; opacity: 1;">
<h3> Shameless S11 Titles</h3>
<div class="flex-video widescreen vimeo" style="display: block;">
</div>
<a class="close-reveal-modal">×</a>
</div>
I'm using the vimeov1.2 fieldtype, and Perch 2.7.7 My webserver supports curl (according to Perch diagnostics) so I'm a bit stumped.
Am I missed something really basic?
In case it's of use, here's my diagnostics report
Is the video private? I think someone else had this issue and the cause was a private video.
Sadly not.. Initially I was trying with a private video, but then saw that thread and thus tried it with a public one, but the same issue seems to occur.
Ahh, but I think perhaps I see the issue now. The Vimeo fieldtype will accept the URL from the page that's on Vimeo, but doesn't like the URL link from the Vimeo share.
So, if I paste in https://vimeo.com/114359151 for my test video, this works, but if I paste in https://vimeo.com/sjoj/restoration which is the link code provided by Vimeo from the 'share' facility, it blanks it.
Is that an minor bug, or my misuse of the field type?
Also, it won't work with a private video, as per that other thread.
I've never seen that second URL format for a Vimeo video before. Is it some sort of custom URL feature?
Private videos don't appear in the API unless you're authenticated and have permission to see the private video. Perch obviously isn't authenticated with your Vimeo account, which is why private videos won't work.
Thanks for the clarification on the Private vids Drew.
Yes, the second URL is one of the free features of Vimeo, where it allows you to specify a more pleasing URL in addition to the standard numerical one. I set that up on a free Vimeo account, so I don't know if there's a case for baking that into the fieldtype notes or something, as I can imagine others possibly getting caught out by that.
We'll need to take a look at the API and see how those URLs can be converted into video IDs. I can't see anything at a quick glance, so I have no immediate suggestion.
No probs Drew.. I think for now I'll use the workaround suggested in the other thread, just taking the URL and adding it in to the page via a text field in the editor instead.