After I received a notice through Available Updates that 5.x-2.x-dev is now the recommended version, I upgraded from 5.x-1.6.

Upon doing so, I found that a previously functioning Views block displaying random images has now disappeared, and any page upon which it should load displays the following error:

user warning: Unknown table 'image' in field list query: SELECT node.nid, rand() AS random_sort, node.title AS node_title, node.changed AS node_changed, image.nid AS image_nid FROM node node LEFT JOIN term_node term_node ON node.nid = term_node.nid LEFT JOIN term_hierarchy term_hierarchy ON term_node.tid = term_hierarchy.tid WHERE (term_node.tid = '39') AND (node.status = '1') AND (node.type IN ('image')) ORDER BY random_sort ASC LIMIT 0, 1 in /home/femrich/public_html/includes/database.mysql.inc on line 172.

I see in the issues queue a number of other problems with 5.x-2.x dev, but none with a solution that I understand. Suggestions on how to deal with this?

Also, this brings up another question. This is the second module I've experienced which shifted from a stable to a dev version as the recommended version in Available Updates and, when I upgraded, the module immediately broke something on my site. Generally I avoid dev modules where possible, but when a dev module is the recommended version, I usually assume that means it's been pretty well tested. The issues queue seems to suggest otherwise. So then why the move to a dev version as the recommended version?

Comments

femrich’s picture

Oh, I'm running MySQL 4.1.22-standard.

Also, although the previously working image view is still broken, I am able to reconstruct an identical view from scratch and it works as the previous view did. For my purposes this may solve the problem as I had only one image view running on my site, though for those with more views containing images it may be a problem still.

dmjossel’s picture

I second the question about 2.x-dev. Why is it reccommended? Of all the contrib modules I run, it's one of the more complicated and tends to be the most sensitive to upgrades; several of the updates I've run have required significant manual cleanup in the database.

kcolwell’s picture

Priority: Normal » Critical

My site is currently broken because of this update why in the world was this dev release recommended in "Available Updates"?

drupalluver’s picture

I completely agree. Why was it recommended?

mdowsett’s picture

I just upgraded....and then read the support requests...ooops! My galleries are broken. THey are still there but show no images (and no errors). Any ideas?

Why, oh why did I 'upgrade'...!?

mdowsett’s picture

hm...I just recopied the previous version I had back to my server and all is good again...lucky I suppose.

Sophia’s picture

Same problem here, everything seems fine, but when I click the gallery, none of the pictures appear. Help!

summit’s picture

Subscribing, greetings, Martijn

Hetta’s picture

I have no problem with the 2.x-dev release (but I don't run views). Perhaps this would help?

My setup: private files, and the {files} table shows the full path to the images, not the relative path. Like this: filepath: /server/home/user/drupal/files/images/yourimagenamehere.jpg

If your filepath starts with /images/ or /files/, you should change that to reflect your full path. Run this bit of sql:
update files set filepath=concat('/drupal/file/system/path/',filepath) where filepath like 'files/%';
( from http://drupal.org/node/184489 )
... backup your files table first, just in case.

Hetta’s picture

marked http://drupal.org/node/209564 as duplicate.

doc2@drupalfr.org’s picture

Same big problem, while upgrading from 1.6 to 2.X-dev. Comment #9 snippet was not helpful *for me*.

Fixed thanks to comment #2 from #210509: Update from 1.6 to 2.x-dev deletes images or error messages.

Hetta’s picture

(Comment #2 in #210509 is just "restore from backup", which is a tad less than helpful.)

Unknown table images means you didn't run update, or if you did, it failed at image update #5200.

Rerun update 5200. If that doesn't work, please report back with new errors.

(If you wish to create the table yourself, here's the SQL (for MySQL):

CREATE TABLE `image` (
       `nid` int( 10 ) unsigned NOT NULL ,
       `fid` int( 10 ) unsigned NOT NULL ,
       `image_size` varchar( 32 ) NOT NULL ,
       PRIMARY KEY ( `nid` , `image_size` ) ,
       KEY `image_fid` ( `fid` )
       )
     DEFAULT CHARSET = utf8;

You should still run update 5200, cos if you don't, the "image" table won't get populated. No pics, with 5.x-2-x, in other words.

sun’s picture

Status: Active » Closed (won't fix)

Sorry, without further information this issue can only be marked as won't fix.

W0lvEriNE’s picture

I have just had this same problem when i upgraded to 5.x-2.0-alpha4. I eventually found that in my View - the Field i was selecting (which was Image: Display Image) was blank (no title, anything) - so i deleted it - re-added Image: Display Image and that fixed the error immediately.

Hope this helps.