When i try to save to the database, no values will be displayed. If i uncheck "save to database" everythink works.
With int values it works by the way only strings do not work.
I did nothing complex i only saved "foobar" in the value.
LIKE: $node_field[0]['value'] = "FOOO";
thx for help
Comments
Comment #1
marcoka commentedComment #2
freestylegary@yahoo.com commentedChecking save to database creates a field item, but no values are stored. Using following test code:
Database shows null
Comment #3
giorgoskincrease data length (available space to store value)
Comment #4
Annakan commentedSale behavior here with a float field saved in DTB, length 10,2.
Value is computer $node_field populated via a custom function.
No database update.
Same behavior in 6.x-dev
Comment #5
Annakan commentedDeleting the field and recreating in with 6.x-dev bring a new interface (much better and more clear) for creating/updating the field definition but the behavior is somewhat "worse".
The field default value is null wihtout regard for the default value supplied.
The code is called as expected but the database is still not updated, at least for a float.
And the field is not displayed on the node where it is defined either.
Edit : same behavior with a string type field.
Comment #6
joemoraca commentedI have same problem - correct value will display but either 0 or nothing written to database table.
Comment #7
El Bandito commentedHi
Yep, I'm seeing this with a string based Computed Field using 6.x-1.x-dev dated 8th March 2011. Works when I don't select the "Store using the database settings below (required for Views use)" checkbox. When I do however the relevant database column is created but the field stubbonly remains set to NULL and nothing is displayed when viewing the node.
Happy to help with any debug assistance but I'm not a coder.
Thanks for the great module, but clearly this is a showstopper of an issue.
El B
Comment #8
duntuk commentedYou have to re-save the content after you click the 'save to database'. Basically what is going on is that the computed value is ONLY stored into the database AFTER you save/update the node.
In other words, say you added a computed field to a content type with a bunch of pre-existing nodes. The pre-existing nodes will not get the computed field value inserted into the database automatically after you create the computed field. You have to hit save on the pre-existing node, and THEN the value is written....
So basically after creating the computed field you'll want to go to admin/content/node and select all the nodes that have the new computed field, check all checkboxes for those nodes, and select 'publish'
Comment #9
dqdDue to the Drupal core life cycle policy and security support advisery, Drupal 6 is no longer supported. So issues for Drupal 6 cannot be longer maintained. The project maintainer has asked for closing all D6 issues to clean up the issue queue.