when I storing the field in database, it stop show to me on node

igorik - January 14, 2009 - 12:42
Project:Computed Field
Version:6.x-1.0-beta3
Component:Code
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

Hi

I am not sure if it is a feature or the bug, but when I check "storing in database" for any computed field, then it stop to show to me on node.
It is neccessary to have 2 same fields, one for showing on node and the second for storing in database (for using in views e.g.) ?
I tried to store really simple computed field, to found if it will be shown or not,: $node_field[0]['value'] = 'test'; db options were text, and length 100, default value was: test2
this field after checking "store in db" was never shown.

Thanks for the answer
Igorik
http://www.somvprahe.sk

#1

kswan - January 14, 2009 - 15:41

What you are describing is not normal. The point of the computed field is that it shows on the node view.

Make sure the "Display Format:" box has:
$display = $node_field_item['value'];

#2

igorik - January 14, 2009 - 15:59

Hi

I have exactly that format in display:
$display = $node_field_item['value'];

Normally I see all my computed fields on node. But when I chceck "store using database...", it disappears.

Thanks for the help
Igorik

#3

kswan - January 14, 2009 - 16:05

Another possibility is the Default Value in the database storage settings. Try to delete the 'test2' and see if that helps.

There can be problems using the default value with the text datatype.

#4

Moonshine - May 21, 2009 - 05:03

I know it's been a while, but are you still having an issue with this? Database storage for Computed Fields shouldn't affect their display, and I haven't seen this happen personally. If you have any further information, I can try testing it out here though.

#5

stickybenson - September 16, 2009 - 15:02

I have this exact same issue. Everything works fine when I don't tell it to save to the database. But when I do, it does not display and it does not get stored, no matter what I'm trying to store, and I've tried leaving it as null or not, and typically tested with default set empty.

#6

igorik - September 16, 2009 - 15:28

Hi stickybenson, I didn't try it for a while, but there was a changed concept aabout month ago with latest version and data are not storing into db but into files or something else I think. Read latest issues and try the latest module version.

#7

webel - October 23, 2009 - 21:40
Category:support request» bug report

Version: 6.x-1.0-beta2

I am getting the same thing. It completely tricked me, I spent about 1/2 hour staring at each character in the example to make sure I had everything right, but nothing would show in the computed field, until I turned off the database storage option.

This is surely a bug.

#8

webel - October 23, 2009 - 21:50

I upgraded to 6.x-1.0-beta3 and it is still broken.

As soon as I select 'Store using the database settings below' the computed field vanishes.

I need to be able to access the computed field from Views, so I need the database storage option.

Very grateful for attention to this soonest,

Webel

#9

webel - October 24, 2009 - 07:10
Version:6.x-1.x-dev» 6.x-1.0-beta3

#10

webel - October 24, 2009 - 07:21

My trouble occurs with 6.x-1.0-beta3 vs. Drupal 6.8.

#11

webel - October 24, 2009 - 07:24

If anybody has managed to get 6.x-1.0-beta3 working could you please confirm that and post a minimal example here, along with the Drupal version. As far as I can tell 6.x-1.0-beta3 is broken, one can't store to database, and so one can't use views of computed fields, which compromises this promising module.

Q: When was the last version known to work together with Views ?

#12

kswan - October 26, 2009 - 14:13

I am using a few Computed Fields with 6.x-1.0-beta2 and I am storing the fields in the database. I am using the varchar data type and setting a data length.

Several months ago I did see a problem using the text data type. Please try varchar.

#13

webel - October 27, 2009 - 00:42
Category:bug report» support request

Moonshine has kindly assisted me with this clarification (extracts from email):

DB stored "computed code" values are computed and stored to the DB when nodes are *saved* or *edited*. So if you have a bunch of existing nodes that were created before you switched to db stored fields, don't expect them to have computed values in the db until they are saved again. Display output code on the other hand is triggered (if used for display) when the field is displayed.

That was exactly my problem.

However if the display output code uses the computed value, which most people do, and that computed value isn't in the db yet, it won't have anything to work with.

And that was what I overlooked.

Thanks for clarification, it works now, however I have to edit and resave a couple of hundred nodes,

Webel

#14

tpainton - November 9, 2009 - 17:39

Same bug but I discovered a work around by simply resaving the node. See this post on issue que.

http://drupal.org/node/627010

 
 

Drupal is a registered trademark of Dries Buytaert.