I updated to the last 5.x-1.x-dev from February 11, did the database update, and now my older video nodes (mostly YouTube) no longer show the player. What's worse, if I try to edit the node, I don't get any fields, not even Body. The body text is still there, shows up in teaser and full mode, but without the player. Fields not related to video (Log, Author, Menu, etc.,) are still there. Adding new video nodes seem to work OK.
Is there some configuration that I still have to do? There seems to be some nice changes in this version, which will make it easier for me to post YouTube videos, but of course not at the cost of losing all my previous videos.
Is there a way for me to revert to the previous version, if I've already done the database update?
Thanks for any help!
| Comment | File | Size | Author |
|---|---|---|---|
| #26 | installer.patch | 3.91 KB | vhmauery |
| #24 | installer.patch | 3.91 KB | vhmauery |
| #19 | installer.patch | 3.64 KB | vhmauery |
Comments
Comment #1
fax8 commentedplease check that you have all the helpers module enabled. Look for them in the video group in the module admin.
Fabio
Comment #2
fax8 commentedThere is a bug in the db updating code in video.install on video_update_5().
The newly introduced vtype field is not being set on existing video nodes.
This is what we should have in place of the TODO line
1 - Select all values from the vidfile field from the video nodes where vtype == "" (see note below)
2 - For each of them compute the correct value for vtype field
something like _video_get_filetype($vidfile) of the old version can be used. This will discriminate between googlevideos, youtube and others.
In case of other, if the user have video_upload enabled consider them as uploads, if not as url videos
3 - store the computed data back in db
NOTE: As we might have a huge number of nodes this could time out.. then is probably better to put this computation into another video_update_N function. Then I think that the user could call the update.php script more than once and this should assure that the process complete.
Any help on fixing this one appreciated.
Fabio
Comment #3
CosmicVoyager commentedI've enabled all the helper modules and looked through all the config options without success. Even if this was a problem, it doesn't explain why I can no longer edit my current videos. In the old version there were options to show the video inline or in a tab; these options no longer seem to be there.
Under "Flash settings" the default entry is "FlowPlayer.swf". I don't have this file, and am assuming that this is not needed to show YouTube videos. Is this the case?
Comment #4
fax8 commentedThe new version always put the video player inline. This is why you don't have that option anymore.
The broken update function above doesn't set the vtype field correctly. This field is now crucial because depending on it's value the video module call the corresponding helper.
Without this field correctly set the video helpers are not called and you are not able to edit correctly the old video nodes.
Instead creating a new video node should work.
Comment #5
dshaw commentedI have the same problem too. Can you tell me what the possible values for the vtype field are. I only have a few video nodes so I can manually enter them via phpMyAdmin or similar. It would appear that that would be enough to solve this problem.
Comment #6
fax8 commentedthe vtype values can be: google, link, upload, url, youtube.
Just remember to enable the associated plugins on the modules admin.
Comment #7
CosmicVoyager commentedI have hundreds of video nodes, and they are practicallly all from YouTube.
Is there a mysql query I can run from phpmyadmin to properly update the nodes?
Comment #8
dshaw commentedIf I didn't have the associated plug-ins enabled before I upgraded do I need to enable them now?
What is the meaning of each vtype value? google and youtube are fairly obvious, but the others are not clear.
For videos I uploaded myself, either .flv or .wmv, I'm guessing their vtype will be upload?
So I tried this. I set the vtype = upload for all my videos. I also enabled the 'upload video' and 'video ffmpeg' modules. Now my videos give me an error message: "Video type not supported". In my case they are ".flv" and ".wmv". They both played fine before. How do I get them to play now?
Comment #9
dshaw commentedCosmicVoyager: a simple SQL statement would be:
update `video` set vtype = 'youtube';NB: This will change all your video nodes to youtube. To be more selective, you need a WHERE clause. Also, if you're using a DB table prefix, you'll need to change 'video' to '<prefix>video'.
Comment #10
CosmicVoyager commenteddshaw: that SQL statement worked, thanks! Well, sort of. I am now able to edit my nodes again. However, the video still wouldn't show, and I found that I had to convert my YouTube URLs from (for example)
iyB7ljHjsJYtohttp://www.youtube.com/watch?v=iyB7ljHjsJY. Is there some SQL magic I can use to patch all my nodes at once, or will I have to go through them one at a time?Thanks for all the great help!
Comment #11
CosmicVoyager commentedComment #12
dshaw commentedI can't think of an easy way to convert your URLs for your youtube videos. You could do a select to extract them all, then edit the result to produce a bunch of SQL statements.
However it seems like a bug that you have to specify the youtube.com bit now. It would be better for all that info to be in the video module.
Comment #13
Anonymous (not verified) commentedsubscribing
Comment #14
fax8 commentedYou might want to try this query:
update video set vidfile=concat('http://www.youtube.com/watch?v=',vidfile)NOTE 1: the above query will be executed on all your video nodes. so don not use it if you have other kinds of video type than youtube.
NOTE 2:always remember to backup your DB before doing such operations.
Comment #15
fax8 commented@dshaw #12
We changed the UI of the video_youtube form to require the user to insert the youtube URL.
User now can simply copy and paste the url into the form without having to look for the youtube video id. Better for the user isn't it?
Then we have to store the whole url as the user, once reediting an existing youtube video, will expect to find what he inserted on the video creation.
Interested in hearing if you have better ideas.
Comment #16
dshaw commentedYou make a fair argument re the youtube URL.
Can I get an answer to my problem in comment #8?
Comment #17
fax8 commentedin reply to #8: please post here the content of the vidfile for those videos.
New version of the video module have plugins which enable different kind of video types. The vtype db field is expected to let the module know which kind of video type we have in order to load the appropriate plugin.
Then the vtype value is completely related to the video_* modules..
google: a google video
youtube: a youtube video
url: a video created inserting the url
upload: a video created uploading a video
Sorry.. there isn't a link one.
Comment #18
dshaw commentedSQL:
select vidfile from video;Result:
files/video/FSoT.flv
files/video/TheMoment.flv
RQ2ekgMEvbo
files/video/wsl-gf.flv
files/video/Highlights-2006.wmv
files/video/Highlights-2005.wmv
files/video/Highlights-2002.wmv
files/video/Highlights-2007.wmv
So there's one youtube and 7 uploaded videos. I've set vtype to 'upload' for them all. The 'Upload Video' module is enabled. And none of them will display the video.
Comment #19
vhmauery commentedTry this patch. I am so sorry about committing the changes without doing the database update. I guess I was just a little bit too excited about the new stuff.
Here is a patch that seems to update most of my videos. For some reason it doesn't seem to work with youtube videos, but it does work with url videos, upload videos, and google videos. Please give it a shot. It shouldn't hurt if it is run more than once (like if you have too many videos and the update script times out and needs to be run again).
Comment #20
fax8 commentedNice work Vernon.
I did not try your patch yet, however seems that you miss the youtube vidfile changes introduced in the new version. See #10, #14, #15 above.
Note: Changing issue title as all the problems are related to the incorrect update functions and we are already at a patch level.
Comment #21
fax8 commentedalways remember to do database backups before testing new code and patches
Comment #22
xav commentedHi,
so I tried the SQL snippet:
update `video` set vtype = 'upload';because I only have *.flv videos, but I obtained the dreaded "Video type not supported" as a result. As I'm a bit wary of trying the patch directly, is there something I can do in the DB to make it work ?Thanks,
Xav
Comment #23
xav commentedBTW, there's something really strange: I executed that request::
select vidfile from video;And some of the entries come out like:
http://parateam.com/system/files/videos/liberta.flv
whereas the others come out empty. In both cases I don't understand:
- why some local flv files come out with a fully-qualified URL ?
- why some others are empty ?
I would have expected all of them to look like files/liberta.flv ...
Comment #24
vhmauery commentedOkay, from my testing, the order to do things is this:
Comment #25
xav commentedAaargh .. of course, I tried this but I skipped step 1 ...
Here's what I got:
Despite this error, the videos seem to work (I haven't tested them all, but the few I tested work again).
Thanks,
Xav
Comment #26
vhmauery commentedXav,
Right. It looks like I had a quoting error in the sql. Okay, that is fixed in this patch. Note that that error only affected youtube videos, so if you didn't have any of those, you can safely ignore the messages you saw.
Comment #27
vhmauery commentedI inadvertently committed this latest patch when committing the change to http://drupal.org/node/221323 so I am marking this as fixed. If there are any other update issues, you can go ahead and open a new issue for that since I think we have a good hold on setting vtype, which is what this issue was really originally about.
Comment #28
dshaw commentedI followed the detailed steps (above) including the latest patch. The contents of the database at the end look ok. I've got values for vtype of 'upload' and 'youtube'. I've enabled several video modules (including params, upload, youtube, custom fields, url). But unfortunately, no joy. I get "Video type not supported" errors and when I edit the video nodes, only two fields appears under "Video Information" and one under "HTML object parameters". No other fields are present to help me manage settings like file size and so on.
Comment #29
Anonymous (not verified) commentedI have just installed the latest version of video (5.x-1.x-dev (2008-Feb-19)), which I think includes the latest patch. Unfortunately, it does not seem to work for me. All newly uploaded videos ("newly" meaning uploaded after the new module version was installed) work fine. The old ones, however, do not work.
Not working means:
a) videos are not played and there is no information indicating that there even is one, just the body text of the node
b) if you edit one of these old videos, there is no "Video Information" - no URL in case of a youtube video, nothing about upload path etc. and also no body
This applies to uploaded videos, youtube videos and to videos linked in from other websites - no difference.
I have checked the database and all the videos, new and old, do have a "vtype" set (either "url", "youtube" or "upload").
Any ideas? For test reasons I switched back to the old video module I used before (from last year) but that is not working either...
Comment #30
Anonymous (not verified) commentedAdditional comment as dshaw has posted his sql result I thought I'd do the same as our problem seems similar:
Comment #31
fax8 commentedwell.. the above values seems just fine.. and I created a video entry on my testing server with the values from the nid 282 above and it worked just fine..
Is this website publicly available? You can use my contact tab from my profile to send me the URL outside the tracking system.
Comment #32
Anonymous (not verified) commentedThe website is no secret: http://www.arts-humanities.net and http://www.arts-humanities.net/video for the videos. However, you will not find much useful stuff there - I needed to get the videos working, so I just deleted the old nodes and uploaded the files again into new nodes and it all seems to work smoothly now.
What I find interesting though, and this may or may not be a clue to what happened, is that the (newly) uploaded files do not show up in the video table:
1011 891 800 600 0 0 0 0 0 0 0 0 0 a:2:{s:9:"video_fid";i:1647;s:3:"iid";s:0:"";} uploadThis is one example - the vidfile column is empty for all uploaded files but has content (a url) for all the videos that are located on other servers, youtube etc. In dshaw's example, the vidfile column has the filename on his server. So I guess there is something odd either in his or my video table...
Comment #33
jorisx commentedI've also got the same issue, so I'm subscribing to this tread
(old thread here: http://drupal.org/node/221009)
my problem is that the vtype's for the old video's which were uploaded in flv format are not set with the upgarde
any help would be appreciated :)
keep up the good work !
Comment #34
yopyop commentedalso subscribing. I have a old videos that don't play, and are not editable, same as comment #29. I just uploaded the March 5 dev version of video module, to see if it would fix it. Is it possible to revert back to an older version of video? I think database changes have been made in the mid-february version of the video module..
Comment #35
dshaw commentedThere's some more info in a related issue that might be relevant.
You should be able to revert to an older version of video - just swap in the old code. I did this quite often while issues were being resolved with the new stuff. The new version added a new column to the video table in the DB. This column is simply ignored by the old version. (So you don't even have to remove it.)
Comment #36
fax8 commented@yopyop: you might want to try this: backup your DB, run update.php but select video module update number as 5.
Comment #37
fax8 commentedany feedback about the new code for the updates?
I runt it on 2 websites and it worked as expected.. anyone confirm it is working correctly now?
Comment #38
CosmicVoyager commentedEverything is working fine for me.
Comment #39
fax8 commentedI'm talking about the update process from old versions (pre February 08) to the current one. Did you run it successfully?
Comment #40
CosmicVoyager commentedYes, all my nodes updated without problems. I only have YouTube videos, though.
Comment #41
fax8 commentedok.. anyone updated on all kind of nodes?
Comment #42
Carlos Miranda Levy commentedI had the same problem. The videos were not showing and there was no edit field after upgrading. It turned out to be a simple step required after upgrading.
Go to -- admin / build / modules -- look for the Video section and enable the other components that are new in this version (Youtube video, google video and URL video) which were not separate components in the older version.
Developers should add a note in the README.txt or instructions for upgrading.
Comment #43
yan commentedMy uploaded videos didn't play neither, although they had the right vtype set ("upload"). I changed it to "url" and now it seems to work.
Comment #44
iLLin commented