I use computed fields on my users. It works fine but the method user_save won't update these fields. The only way I have to make it refresh is to save manually the user.


Kodiak’s picture

Priority: Normal » Major

I'm sorry to insist but am I the only one experiencing that? Am I doing something wrong? Is there a workaround?

sockeye’s picture

I'm having a problem that sounds like it may be the same thing. I'm trying to use a computed field in a taxonomy term display. When I add the computed field it gives me starting values for Computed Code and Display Code. Whatever I put in those fields (including leaving them unchanged) doesn't seem to have any effect. When I click Save Field Settings I am returned to the same screen with the two code blocks unchanged from their original default values.

Kodiak’s picture

Category: bug » support

Sorry, I found my mistake.
I was calling user_save from a hook_node_update. So the data was not stored in DB yet when computed field tried to do its job.

I would appreciate if someone could tell me how to trigger the update of the computed field (with user_save) AFTER the data on which it depends is updated.