Hi,

for the my video field, I setted as files destination a private folder.

The video is showed without problem, but If I add to a view the video field as thumbnail, the thumbnail image generated is linked to public folder instead of the private folder, and the image is not showed!

The same happen if I add the thumbnail visualizzation to the node.

Comments

Jorrit’s picture

Status: Active » Postponed (maintainer needs more info)

I have been working on this in the current -dev release. That release is not very stable yet, but you can test it to see if it works for you. If you experience any problems with the -dev release, please let me know!

mecmartini’s picture

Well I will test it!

mecmartini’s picture

I'm trying to update the module to dev, but when I run update.php it return white page with this error:

Fatal error: Class 'video_utility' not found in /var/www/portal/sites/all/modules/video/video.module on line 113

Jorrit’s picture

That class should be autoloaded, but I think that Drupal only clears its autoload cache after update.php is run. Can you clear your cache on the Performance page and then run update.php?

mecmartini’s picture

I did it but it doesn't work :(

Jorrit’s picture

Please add module_load_include('utility.inc', 'video'); before line 114 of video.module, so it looks like:

  // We include video.utility.inc here, because when upgrading the autoload cache is not updated yet.
  module_load_include('utility.inc', 'video');
  $players = video_utility::getVideoPlayers();
mecmartini’s picture

Ok the good news are that now the dev release work and thumbnail too!

The bas news is that now I can't play the video :(

Jorrit’s picture

Do you have more information about this problem? Are there error messages? Also read http://drupal.org/node/1543886

mecmartini’s picture

There aren't error messages. The player is showed correctly, but when I click on play it doesn't start. I'm using video.js as player.

Jorrit’s picture

Can you take a look at the HTML source code and look for the <video*</video> part. Can you post that part here?

mecmartini’s picture

The HTML source code:

<video id="video-189-video" data-setup="{}" class="video-js vjs-default-skin" width="640" height="360" controls="controls" preload="auto" poster="http://biogate.kelyon.net/portal/system/files/videos/thumbnails/189/thumbnail-189_0001.png">
  <source src="http://biogate.kelyon.net/portal/system/files/videos/converted/189/nuovo_spot_mac_ita_certe_cose_non_cambiano_mai_flv_1335527015.flv" type="video/flv" />
</video>
mecmartini’s picture

Looking the code seems that now there is the same problem of thumbnail before. The video is linked in the public folder instead of private folder!

I already edited the video field after the upgrade to the dev version with the new settings.

Jorrit’s picture

The URLs point to /system/files/, which means that the private file system is used. Why the files can't be retrieved, I don't know.

If you run the following query on the database, what is the result?

SELECT * FROM file_managed WHERE filename = 'thumbnail-189_0001.png' OR filename = 'nuovo_spot_mac_ita_certe_cose_non_cambiano_mai_flv_1335527015.flv'

mecmartini’s picture

The my private folder is /system/files/private.

Running the query I get two results:

|190|1|thumbnail-189_0001.png|private://videos/thumbnails/189/thumbnail-189_0001.png|image/png|99877|1|1335526968

|195|1|nuovo_spot_mac_ita_certe_cose_non_cambiano_mai_flv_1335527015.flv|private://videos/converted/189/nuovo_spot_mac_ita_certe_cose_non_cambiano_mai_flv_1335527015.flv|video/x-flv|1515522|1|1335527015

Jorrit’s picture

I think I have found the problem. In video.module, change output.fid to converted.fid on line 239. The line becomes:

$fileinfo = db_query('SELECT video.uri videouri, converted.* FROM {file_managed} video JOIN {video_output} op ON video.fid = op.original_fid JOIN {file_managed} converted ON converted.fid = op.output_fid WHERE converted.uri = :uri', array(':uri' => $uri))->fetchObject();

mecmartini’s picture

Ok found the problem!

In realy the string converted.fid was already like that, but looking at your code I found a difference into "WHERE" conditions. The my code was this:

$fileinfo = db_query('SELECT video.uri videouri, converted.* FROM {file_managed} video JOIN {video_output} op ON video.fid = op.original_fid JOIN {file_managed} converted ON converted.fid = op.output_fid WHERE output.uri = :uri', array(':uri' => $uri))->fetchObject();

So I replaced the query with your code and now it's works!!!

Great job thank you so much for your awesome support :)

Jorrit’s picture

Yes, I should have said output.uri, my bad. Thanks for correcting me and many thanks for taking the effort of testing this version! You have helped me a lot. Can you change the status of this issue to fixed if there are no more issues?

mecmartini’s picture

Status: Postponed (maintainer needs more info) » Fixed

Ok everything seems to work well now!

Hope to have a new stable release soon :)

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

fox_01’s picture

I got the same problem and just had to activeate a playermodule like video.js or flowplayer api and the error was gone.