Closed (won't fix)
Project:
Computed Field
Version:
5.x-1.2
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
5 Oct 2006 at 14:22 UTC
Updated:
21 Aug 2009 at 06:57 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
wrunt commentedHave you tried updating to the latest 4.7 version of cck?
Comment #2
pgassner commentedI'm using the CCK released on Sept. 19th for Drupal 4.7
I just tried it again and it seemed to work even without my modification. Now, that is a strange thing, because I didn't change anything during the night - could this be a cacheing problem? It seems like it because several hours passed since I last loaded the page and now it works. When I updated the code to the 9/29 version yesterday the output disappeared immediately, when I switched it back, the output was there again.
I'm not really sure, how the drupal hook system works internally, but I could imagine it cacheing module hooks. I tried to disable and enable computed_field, as well as the content module, though, so everything would get loaded again - and it didn't help then.
Another possibility could be the contemplate module. Enabling and disabling it didn't make a change, but maybe it cached something that I didn't want it to. At the moment it is enabled but I haven't changed its template.
I'd be very interested to hear what you think of this situation, whether it could be a cache thing on the Drupal, CCK, contemplate side or whether this is a silly server or whatever.
Thanks!
Comment #3
pgassner commentedNow, I don't know whether I want to much from this module or whether this really is a bug.
I'm trying to use the computed field to gather information from other content_types and can't really get it to work the way I want it to without having the
_computed_field_compute_valuefunction in both the «load» and the «view» hook. If it's only in the «load» hook the fields' contents do not update unless I edit and save the node. This seems to make perfect sense to save DB-queries, but in my situation it doesn't work: another content_type could be updated and this should be reflected here.To me these problems seem to have the same source that's why I still post this in this bug report.
Comment #4
zacherbaugh commentedpgassner, I don't think you're asking too much! The documentation in the README.txt and on the project page says this:
which the behavior that you, I, and this user are looking for.
I've been trying to reproduce the fix you described in #3 involving adding a _computed_field_compute_value call to the «view» hook, but so far I get duplicates of my data (one updated correctly, one not). Can you post a code snippet of the computed_field_field function? It would be helpful to me, and also might help wrunt to fix this.
and wrunt, thanks for an excellent module!!
Comment #5
zacherbaugh commentedI;'m still trying to get this to work as advertised. I'm using the version updated 27 Nov. 2006. In looking at the changelog, I find this:
which would appear to directly contradict the project page as cited in #4.
Here's how I've hacked the «view» hook in computed_field.module to make non-stored fields compute on view (only one line was added):
To make this work properly, I also have to be sure that the field is cleared out before use in any computed code (ex.
$node_field[0]['value'] = "";); otherwise, I get multiple copied of the computed result.Comment #6
f.mardini commentedHi,
I am having issues here as well.
I don't even get the computed field to appear in the form for creating the node (it is also not displayed in the view).
I am using drupal 5 with the latest CCK
Comment #7
denegen commentedUsing Drupal 5.1, CCK 5.x-1.4 and Computed Field dated 2006-Nov-27.
No output is given in a view or edit page. It looks like no hook functions from the module are called at load or view.
Comment #8
Anonymous (not verified) commented+1
Comment #9
yhager commentedI believe that this happens because the function computed_field_field_settings() does not handle correctly the case where it is called with $op='callbacks', as documented in hook_field_settings() on cck/field.php.
Patch attached.
Comment #10
yhager commentedComment #11
wrunt commentedThanks yhager, I've added your change to cvs, but it seemed to work for me even before making the change.
Comment #12
(not verified) commentedComment #13
rubenk commentedEven after this patch looks like it was rolled into release 5.2 I have problems where
I use the code provided to link back to the node.
I set the field to "display raw text in the content type field settings for my given content type.
When i PREVIEW a submitted node, it WORKS, I see the link back to the node BUT
When I submit it and view the node after submittal it's GONE.
MAGIC? I opened this back up because it seems related. Strange Behavior. I am fully up to date with
Computed Field 5.x-1.2
Content Construction Kit (CCK) 5.x-1.6-1
Comment #14
Zoologie.de commentedSame here no output. no field no nothing although it pretends to be there :/
CCK 1.6 and computed field downloaded today :/
Ckicked display field did store in data base, tried to add to a group ... nothing ... :(
Comment #15
sin commentedTry latest patch at http://drupal.org/node/134661
Works for me.
Comment #16
deekayen commented5.x is unsupported. re-open for 6.x if applicable
Comment #17
deekayen commented