"Video not available" when upgrading to 1.4 from older versions
| Project: | FlashVideo |
| Version: | 6.x-1.4 |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
I upgraded from 6.x-1.4-beta6 to 6.x-1.4 and all the videos on the site went to "Video not available". They were all created with earlier versions of the Flashvideo module. This may be related to the "'Video Not Available' due to File Framework Attach" bug, http://drupal.org/node/341128
Symptoms: all old videos no longer load, and just say "Video Not Available". Switching back to beta6 restores the videos. New videos created with 1.4 work fine, but if you edit an old video, it does not show any video files attached.
Analysis: appears to be a problem with handling node revisions. The UPLOAD table vid does not point to the current revision of the node, so when editing or trying to play a video, Flashvideo does not locate the associated files.
Quick Fix: update the vid in the UPLOAD table to the vid identified in the NODE table for the nodes containing video. They appear to work fine after this fix, and new rows in the UPLOAD table are created when new revisions are created with 1.4.
I have a 'video' page type for my videos, so the SQL query:
update upload u, node n set u.vid=n.vid where u.nid=n.nid and n.type='video'
corrected all the problems, and the videos now play correctly. (This is a solution for me. If you have your videos on other page types, adjust the SQL appropriately for selection. WARNING... if you are using revisions, trying to update the entire UPLOAD table will probably crash with "duplicate key" errors. Better to select just your videos.)
It would be a benefit for the update procedure to check for this condition and correct it.
