Closed (fixed)
Project:
Content Construction Kit (CCK)
Version:
4.7.x-1.5-1
Component:
nodereference.module
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
20 Jun 2007 at 15:14 UTC
Updated:
18 Jul 2007 at 12:39 UTC
Comments
Comment #1
moggy commentedon further investigation, it's only appearing on nodes that have a CCK Node Reference field.
Comment #2
yched commentedThanks for the info. I'm moving to CCK then - I'll have to investigate.
Could you please confirm exactly which release of cck you are using ?
And if it's a dev release, please paste the // $id line at the beginning of nodereference.module
Comment #3
moggy commentedI've just downloaded and tried 4.7.x-1.5-1. I'm pretty sure that's what I had before anyway.
same results.
Comment #4
yched commentedmoving to correct version
Comment #5
yched commentedFixed in all dev branches - many thanks to you for doing the right debug work, this has gone unnoticed for a while, a could have (maybe has indeed ?) been a pain to locate.
Comment #6
moggy commentedwell, it seems to be fixed if I use a view to select which nodes can be referenced, but if I leave it at the default '--' I'm still getting it running the query once for each node eventually listed.
Comment #7
yched commentedWell the whole point was to stop this query being made when selecting '--' (no view) :-), so you're telling me the fix did not change anythings ?
That's odd, I did actually test this to be OK (on the 5.0 bracnh, though, but this should really make no difference).
Are you positive you have downloaded the right code ? Maybe the 1.x-dev tarball had not been repackaged yet when you grabbed it ?
You should have this line at the beginning of nodereference.module :
// $Id: nodereference.module,v 1.25.2.38 2007/06/21 14:11:54 yched Exp $
Comment #8
moggy commentedthat's beter. sorry for the false alarm. I can't have got the latest updates when I downloaded it yesterday.
I'm not getting the repeating sql now.
Comment #9
yched commentedI like that better :-) Thanks for reporting.
Comment #10
karens commentedI just ran into this again on a field that was created long ago and never updated. The problem was that it was a nodereference field that pre-dated the views handling so it did not have any value for $field['advanced_view']. I had to go back and edit the field and save it so that the value got added.
So things will be OK if people are using updated fields. Maybe there's nothing to be done except be aware in case this is reported again. The other option is to add a check for whether the field has any value and skip the query in that case, too. It does seem to make some sense that you wouldn't run the query when there is no value.
Not sure which approach is best, open for ideas. If we don't want to do anything we can mark this fixed again.
Comment #11
yched commentedagreed that we should check if the value is set (I thought we were already ?)
Comment #12
karens commentedNope, checking if != '--'. If there is no value at all, it is not '--', so it registers true and runs the query.
Comment #13
yched commentedOK - Fixed now.
Comment #14
(not verified) commentedComment #15
moshe weitzman commentedquery was happenning 1850 times on Observer.com article form ... we might want to make a bug release for this.