Hello everyone,

since I wanted the exposed sort criteria for my Views-Pages so bad, I upgraded from Views 2 to 3.
Since then, none of my Pages or Blocks are displaying Flash-Videos anymore.

Flash Video 6.x-1.5 provides a custom Field for Views in which the uploaded Video from that node was updated. Worked fine in Views 2, not in 3.

Views 2 Query:

SELECT node.nid AS nid,
   node.title AS node_title,
   node.language AS node_language,
   flashvideo.nid AS flashvideo_nid,
   node_revisions.body AS node_revisions_body,
   node_revisions.format AS node_revisions_format,
   node.changed AS node_changed
 FROM node node 
 LEFT JOIN term_node term_node ON node.vid = term_node.vid
 LEFT JOIN term_data term_data ON term_node.tid = term_data.tid
 LEFT JOIN flashvideo flashvideo ON node.nid = flashvideo.nid
 LEFT JOIN node_revisions node_revisions ON node.vid = node_revisions.vid
 WHERE (node.type in ('front_trailer', 'front_video', 'video')) AND (term_data.vid in ('1')) AND (term_node.tid = 27) AND (flashvideo.fid =
				  (
					select
						max( files.fid )
					from
						flashvideo fv_sub
						left join files on fv_sub.fid = files.fid
					where
						fv_sub.nid = node.nid
						and
						(files.filemime = 'flv-application/octet-stream' OR files.filemime = 'application/octet-stream' OR files.filemime = 'application/x-flash-video' OR files.filemime = 'video/x-flv' OR files.filemime = 'video/mp4' ) ))
   ORDER BY node_changed DESC

The same Query just won't work in Views 3.

Maybe this is not the task of the Views Developers, but does maybe someone know a workaround?

Sorry in advance if the information i have given isn't sufficiant.

Thank for your time,
DK

CommentFileSizeAuthor
#8 views-class.patch5.36 KBDungeonkeeper

Comments

Dungeonkeeper’s picture

In Line 6 i meand displayed insted of updated, sorry for being sloppy.

dawehner’s picture

Project: Views (for Drupal 7) » FlashVideo
Version: 6.x-3.x-dev » 6.x-1.x-dev
Component: node data » Views Plugin

Let's move first to flash video to find out whether it's really a view bug.

dawehner’s picture

Priority: Major » Normal
Status: Active » Postponed (maintainer needs more info)

Move back to views.

And update status. With this informations it's impossible to answer.

Anonymous’s picture

Here is an update. This with the latest devs for Flashvideo and Views as of today. Condition is that Flashvideo field must be added to the view and the error occurs.

user warning: Unknown column 'flashvideo.fid' in 'where clause' query: SELECT node.created AS node_created, node.nid AS nid FROM node node INNER JOIN term_node term_node ON node.vid = term_node.vid WHERE (node.status = 1) AND (term_node.tid = 1) AND (node.type in ('blog')) AND (flashvideo.fid = ( select max( files.fid ) from flashvideo fv_sub left join files on fv_sub.fid = files.fid where fv_sub.nid = node.nid and (files.filemime = 'flv-application/octet-stream' OR files.filemime = 'application/octet-stream' OR files.filemime = 'application/x-flash-video' OR files.filemime = 'video/x-flv' OR files.filemime = 'video/mp4' ) )) ORDER BY node_created DESC LIMIT 0, 1 in /var/www/xxxxx/html/xxxxxxxx/sites/all/modules/views/plugins/views_plugin_query_default.inc on line 1146.

Im suspecting there might be a tiny issue in the dev build, especially "FlashVideo Views". I don't think its a Views issue. Don't have time to track, i'm badly behind on a clients project, but I hope this helps. Recommend to downgrade to 6.x-1.5.

Dungeonkeeper’s picture

Version: 6.x-1.x-dev » 6.x-1.5

Well I am using FlashVideo 6.x-1.5 and the error occurs.

I think when my Issue was moved from Views to FlashVideo, the Version info wasn't changed the right way.
Changed that.

For clarification:
Views 6.x-1.x-dev and FlashVideo 6.x-1.5 -> not working.
I guess even with FlashVideo 6.x-1.5 there will be the same error you are experiencing with FlashVideo 6.x-dev.

Thank you for taking your time testing it out.

Anonymous’s picture

For me Views 6.x-1.x-dev and FlashVideo 6.x-1.5 works just fine. Have you cleared the caches and what not? The Issue only came up for me with the Dev build of FlashVideo. Optionally, uninstall both (after a backup) completely and reinstall again. Also, what version of PHO and MySQL are you running?

Dungeonkeeper’s picture

Hey,

MySQL Version 5.1.49
PHP 5.3.3-7+squeeze1, installed via php5-dev.

I will try out your suggestion.

Edit:

Deinstalling ist not an Option, all data is lost if i proceed to do it. This is a productive site with a lot of data and files, Views handles 80% of it.
I also tried replacing the whole Flashvideo Folder in modules (i had 2 patches installed), but it still showed no effect.

Will try it on a fresh drupal installation.
Thanks

Dungeonkeeper’s picture

StatusFileSize
new5.36 KB

Hi,

before i forget:

I have one patch installed for views, just to add specific ccs classes inside of views.
I can't really tell if this could cause the problem, so i attached it.

Thanks