Forum

Thread tagged as: Problem, Field-Types

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">&#215;</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">&#215;</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?

Murray Fisher

Murray Fisher 0 points

  • 6 years ago

In case it's of use, here's my diagnostics report


Perch: 2.7.7 Production mode: Production (100) Installed apps: content (2.7.7), assets (2.7.7), categories (2.7.7), perch_forms (1.8.2), perch_backup (1.2) DB driver: PDO DB tables: perch2_categories, perch2_category_counts, perch2_category_sets, perch2_content_index, perch2_content_items, perch2_content_regions, perch2_forms, perch2_forms_responses, perch2_navigation, perch2_navigation_pages, perch2_page_templates, perch2_pages, perch2_resource_tags, perch2_resources, perch2_resources_to_tags, perch2_settings, perch2_user_privileges, perch2_user_role_privileges, perch2_user_roles, perch2_users Users: 1 App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_forms', ); Editor plug-ins: markitup, redactor H1: 1f8faa44b8d3e377de5bbbd4f3891e16 L1: 23a6fc2bb5d167a3c88fe8781ac32191 headerColour: #ffffff content_singlePageEdit: 1 helpURL: siteURL: / hideBranding: 1 content_collapseList: 1 lang: en-gb update_2.7.7: done latest_version: 2.5.3 on_sale_version: 2.7.7 headerScheme: light perch_backup_mysqldump_path: dashboard: 1 hide_pwd_reset: 0 content_hideNonEditableRegions: 0 content_frontend_edit: 0 logoPath: /admin/resources/logo.png PERCH_DEVELOPMENT: 10 PERCH_STAGING: 50 PERCH_PRODUCTION: 100 PERCH_DB_USERNAME: thera349_whadmin PERCH_DB_SERVER: localhost PERCH_DB_DATABASE: thera349_warehouseCMS PERCH_DB_PREFIX: perch2_ PERCH_TZ: Europe/London PERCH_EMAIL_FROM: murray@trickster.co.uk PERCH_EMAIL_FROM_NAME: Murray Fisher PERCH_LOGINPATH: /admin PERCH_PATH: /home/thera349/public_html/warehousefilms.co.uk/admin PERCH_CORE: /home/thera349/public_html/warehousefilms.co.uk/admin/core PERCH_RESFILEPATH: /home/thera349/public_html/warehousefilms.co.uk/admin/resources PERCH_RESPATH: /admin/resources PERCH_HTML5: 1 PERCH_RUNWAY: PERCH_ERROR_MODE: DIE PERCH_DATE_LONG: %d %B %Y PERCH_DATE_SHORT: %d %b %Y PERCH_TIME_SHORT: %H:%M PERCH_TIME_LONG: %H:%M:%S PERCH_DEBUG: PERCH_PREVIEW_ARG: preview PERCH_TEMPLATE_PATH: /home/thera349/public_html/warehousefilms.co.uk/admin/templates PERCH_DEFAULT_DOC: index.php PERCH_DEFAULT_EXT: .php PERCH_PRODUCTION_MODE: 100 PERCH_RWD: PERCH_HTML_ENTITIES: PERCH_SSL: PERCH_AUTH_PLUGIN: PERCH_DB_CHARSET: utf8 PERCH_DB_PORT: PERCH_DB_SOCKET: HOSTING SETTINGS PHP: 5.4.36 Zend: 2.4.0 OS: Linux SAPI: cgi-fcgi Safe mode: not detected MySQL client: mysqlnd 5.0.10 - 20111026 - $Id: c85105d7c6f7d70d609bb4c000257868a40840ab $ MySQL server: 5.6.21 Extensions: Core, date, ereg, libxml, openssl, pcre, sqlite3, zlib, bcmath, calendar, ctype, curl, dom, hash, filter, ftp, gd, gettext, SPL, iconv, session, json, mbstring, mcrypt, standard, mysqlnd, mysqli, mysql, Phar, posix, pspell, Reflection, imap, SimpleXML, soap, exif, tidy, tokenizer, xml, xmlreader, xmlrpc, xmlwriter, xsl, zip, cgi-fcgi, suhosin, PDO, pdo_sqlite, pdo_mysql, ionCube Loader, Zend Guard Loader GD: Yes ImageMagick: No PHP max upload size: 64M PHP max form post size: 64M PHP memory limit: 128M Total max uploadable file size: 64M Resource folder writeable: Yes Session timeout: 24 minutes Native JSON: Yes Filter functions: Yes Transliteration functions: No DOCUMENT_ROOT: /home/thera349/public_html/warehousefilms.co.uk GATEWAY_INTERFACE: CGI/1.1 HTTP_ACCEPT: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8 HTTP_ACCEPT_ENCODING: gzip, deflate, sdch HTTP_ACCEPT_LANGUAGE: en-US,en;q=0.8 HTTP_CONNECTION: keep-alive HTTP_COOKIE: ASPSESSIONIDCARQQTTB=BIKHMJNDMGGNNBCDFEGIKEPF; ASPSESSIONIDCARQQQSA=HECNNOODLKGLCAELMLPCHNKP; ASPSESSIONIDAASRTTTB=NFDNLPEDDDAPHICNJKHPFEGI; ASPSESSIONIDQSDSDBRA=LNPHBNPBMMAKKDDBPPPPBGIL; cmsa=1; PHPSESSID=4cf5a7db801a548084d3234077d313e0 HTTP_HOST: www.warehousefilms.co.uk HTTP_REFERER: https://www.warehousefilms.co.uk/admin/core/settings/diagnostics/ HTTP_USER_AGENT: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36 PATH: /bin:/usr/bin PHPRC: /home/thera349/etc/ QUERY_STRING: extended REDIRECT_STATUS: 200 REMOTE_ADDR: 78.146.227.202 REMOTE_PORT: 49376 REQUEST_METHOD: GET REQUEST_URI: /admin/core/settings/diagnostics/?extended SCRIPT_FILENAME: /home/thera349/public_html/warehousefilms.co.uk/admin/core/settings/diagnostics/index.php SCRIPT_NAME: /admin/core/settings/diagnostics/index.php SERVER_ADDR: 69.90.66.200 SERVER_ADMIN: webmaster@warehousefilms.therapythroughcbt.co.uk SERVER_NAME: www.warehousefilms.co.uk SERVER_PORT: 80 SERVER_PROTOCOL: HTTP/1.1 SERVER_SOFTWARE: Apache UNIQUE_ID: VLgJ3UVaQsgADrTcHfoAAAAK PHP_SELF: /admin/core/settings/diagnostics/index.php REQUEST_TIME_FLOAT: 1421347293.84 REQUEST_TIME: 1421347293 argc: 1
Drew McLellan

Drew McLellan 2638 points
Perch Support

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.

Drew McLellan

Drew McLellan 2638 points
Perch Support

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.

Drew McLellan

Drew McLellan 2638 points
Perch Support

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.