tested against imagefield fields and youtube_cck fields. may be that those two modules call the api incorrectly; haven't tested against standard field types yet. only got the errors after updating to the dev release from 3/6/07

user warning: Unknown column 'query' in 'field list' query: SELECT name, query FROM view_view ORDER BY name in /home/nrdc/www/includes/database.mysql.inc on line 172.

Comments

merlinofchaos’s picture

You didn't run update.php the last time you updated code, did you?

RobRoy’s picture

@merlin, I'm getting this too and update.php says I'm up to date.

views_update_12() has this which shows it dropped query.

$ret[] = update_sql("ALTER TABLE {view_view} DROP query");
RobRoy’s picture

Title: Adding a new field causes an error » Adding a new field causes an error: field 'query' does not exist
Project: Views (for Drupal 7) » Content Construction Kit (CCK)
Component: Code » Views Integration

This is a bug in _content_views_rebuild_views() it looks like.

yched’s picture

Yes, content.module is not yet updated to account for latest cache changes in views-dev

merlinofchaos’s picture

Oh. 'query' disappeared in the -dev version. I didn't realize anyone external was utilizing queries which checked this field. That's somewhat unfortunate.

yched’s picture

No, it's alright - and I was perfectly aware of that when I submitted the 'cache' patch - AAMOF, I submitted it just to get rid of _content_views_rebuild_views :-)

I was just not sure of when to update CCK accordingly. I guess I was waiting for Views 1.6 to be released.

merlinofchaos’s picture

The bug that was holding me back has been found and a patch has been submitted, but I have to find the time to sit down, clean up a few things and roll a release. And my baby shower is this weekend which means the in-laws and such will be here. But also my best friend from out of town too. Which is good, but likely to not be a programming friendly environment!

yched’s picture

no pressure intended ;-)

yched’s picture

Status: Active » Fixed

Actually, when Views 1.6 does get out, CCk will have to release a matching version straight away, so I guess it's best to commit the cck fix now and have a little time to make sure everything is OK.
Plus Karen just committed a first compatibility fix, so I went ahead and committed the rest.
CCK 1.x now targets Views 1.x (I added a note on CCK's project page about it)

Earl : can you drop us a note before you release Views-1.6, so that we can be fast on releasing our matching CCK ?

KarenS’s picture

You marked the other issue duplicate, so I'd better move my comment here.

I'm worried that we won't know what version of Views people are using, so how do you plan to handle that? I don't think we can require a certain version of Views, or are you thinking we can?

yched’s picture

I don't think we can require a certain version of Views, or are you thinking we can?
Actually I was thinking we could.
Besides, it's not actually 'requiring', since using the updated CCK with a non-updated Views will not _break_ anything - you 'just' lose the automatic refreshment of cached Views query when your field definitions change.

Keeping some logic in CCK to determine which version of Views is running and branch accordingly would be adding cruft IMO, I don't think I'm willing to maintain this kind of compatibility checks.
Simply adding a drupal_set_message in a CCK update function, advising the admin to update to Views 1.6 should be enough. What do you think ?

KarenS’s picture

That's why I asked, I wasn't sure what your plans were. I think if nothing will be broken (except that Views won't update) that is OK because if anyone has issues we can just say 'Get the latest version of Views). So I'm OK with that.

merlinofchaos’s picture

How about this: I'll make the tag when I'm ready, and send you a contact message, and when you're ready I can make an actual release from the tag.

yched’s picture

Deal :-)

yched’s picture

Earl has released Views 1.6, and CCK 1.5 is out too :-)

Anonymous’s picture

Status: Fixed » Closed (fixed)
vandeto’s picture

Category: bug » support