Forum

Thread tagged as: Problem

Uploading a video results in unexpected behavior

Hi! I’ve created a <perch:content type="file"/> field for editors to upload a short video (which the front-end will display as a background on a carousel slide). It’s type="file" because I couldn’t think of anything better than that, since there is no video type.

The problem I’m experiencing is that when clicking on the Select or upload a file link from the editing page, the assets drawer opens up showing no files at all. Instead, I see a message that reads No matching assets found. It also doesn’t show any filters until I switch to list view, where all of a sudden two filters pop up (one for the bucket, one for the file type, which is Documents by default). I understand why the list would be filtered by this file type by default, but don’t quite understand why said filter wouldn’t show up to begin with.

When I switch to list view, I am made aware of the filters. Clicking on Clear Filter for either filter clears them both, for some reason. Once they’re cleared, I see the video I had previously uploaded and I can select it, save the page, and the video is served correctly on the front-end.

Similarly confusing behavior occurs when uploading an asset on the asset drawer. After the file uploads, it is not shown below. Again, no mention of filters anywhere, just that No matching assets found message. If —instead of switching to list view— I select Video from the file type, I am presented again with an empty assets pane, but the filters show up. Again, clearing one of them clears them both, and I can then see the video I just uploaded (next to the one I had uploaded earlier) and use it in my file field.

I’ve created a GIF illustrating all of this. First I try selecting a previously uploaded video (going through the first scenario described above), then I refresh the page and try uploading a video (second scenario above). Here’s that GIF: https://g.recordit.co/Xxlj1HKCqX.gif

So, while my editors are currently able to upload and select a video for use in a page, the steps required to do so make the CMS (or my implementation of it) seem buggy. I’ve yet to hand this project off (that’s still a few days off), and would love to find a solution to this before I have a training session w/the client.

Thanks!

Diagnostics:

Perch Runway: 2.8.29, PHP: 5.5.9-1ubuntu4.14, MySQL: 5.5.47, with PDO
Server OS: Linux, apache2handler
Installed apps: content (2.8.29), assets (2.8.29), categories (2.8.29), perch_events (1.9.2)
App runtimes: <?php $apps_list = array( 'content', 'categories', 'perch_events' );
PERCH_LOGINPATH: /perch
PERCH_PATH: /home/deploy/now-center-1461359832081/perch
PERCH_CORE: /home/deploy/now-center-1461359832081/perch/core
PERCH_RESFILEPATH: /home/deploy/now-center-1461359832081/perch/resources
Image manipulation: GD
PHP limits: Max upload 12M, Max POST 12M, Memory: 256M, Total max file upload: 12M
F1: 2edba60ed1f613d6dd804feb202456a2
Resource folder writeable: Yes
HTTP_HOST: now-center.asmallbatch.co
DOCUMENT_ROOT: /var/www/vcuhealthnowcenter.org/html
REQUEST_URI: /perch/core/settings/diagnostics/
SCRIPT_NAME: /perch/core/settings/diagnostics/index.php
Alfonso Gómez-Arzola

Alfonso Gómez-Arzola 0 points

  • 5 years ago

Can you post the whole template you are using?

Drew McLellan

Drew McLellan 2638 points
Perch Support

I don't think we have M4V listed as a recognised video format, which would explain why it's being listed as a document.

I'll see if we can get it added.

Drew, you just made me realize it’s a .m4v! I had explicitly requested an .mp4 from the client, and foolishly took it at face value. This explains why Chrome on Android isn’t playing the file for me.

In any case, I suppose it’s a good idea to add M4V to the list of video formats Perch recognizes, but I’ll just convert the file and upload as an MP4 for compatibility’s sake.

Thanks!

So is it the intended behaviour to hide the filter labels, eg:

  • You are viewing assets filtered by type ‘Documents’
  • You are viewing assets filtered by bucket ‘Bucket Name’

upon opening Assets, until you change the view to list or choose another filter?

Because this is similarly confusing to me as well.