Tell me more ×
Drupal Answers is a question and answer site for Drupal developers and administrators. It's 100% free, no registration required.

I'm using Drupal 7 and the Computed Field module. I have this problem both with Custom Content Type and with Custom Entity Type. When I add a computed field and go to the Field Settings, I type in some PHP code and click the Save field settings button. The page merely reloads, with my code deleted and I'm back where I started. Is this a bug? Or is it maybe not liking my code and deleting it rather than causing a fatal error? But it fails even with simple code like $entity_field[0]['value'] = "test"; That gets deleted too. Is it possibly not allowing me to add a computed field since I have already created content and entities of those content and entity types?

share|improve this question
its possible that there is a silent error condition in mysql (perhaps because the module is awaiting updates?) that is preventing the data from being saved. Have you checked your error logs after trying to save? – schnippy Oct 16 '12 at 21:15
All the modules are up to date. How do you check the error logs? – Dan Oct 29 '12 at 14:13
1  
ok - assuming that both the modules and their corresponding database updates have been completed then the only place left to isolate this is in the error logs. You can look in the error logs in your drupal admin reports (admin/reports/dblog) assuming you have database logging enabled. Otherwise, you'll need to find where on your server your error logs are being output to and look for clues there. – schnippy Oct 30 '12 at 15:17
Thanks. It looks like Database logging is not enabled by default. I went ahead and enabled that and will give this another try to see what it registers. – Dan Oct 30 '12 at 16:18
Well, that's strange. It seems to save now. Not sure why it didn't save before and does now. Could be a module update as you suggested or maybe a database update that was performed with it. Thanks for the input. – Dan Nov 4 '12 at 2:37
show 2 more comments

Know someone who can answer? Share a link to this question via email, Google+, Twitter, or Facebook.

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.