Bug #74462

Setting a field to null in an own extension won work with process_datamap()

Added by Klaus Hinum about 4 years ago. Updated 3 months ago.

Needs Feedback
Must have
DataHandler aka TCEmain
Target version:
Start date:
Due date:
% Done:


TYPO3 Version:
PHP Version:
Is Regression:
Sprint Focus:


Setting eval=null in tca.php of the extension now works in the Typo3 forms, but how can I change or set a value to NULL in my own extension.
$this->tce = \TYPO3\CMS\Core\Utility\GeneralUtility::makeInstance('TYPO3\\CMS\\Core\\DataHandling\\DataHandler');

where I got a "field" => null in the $data array wont work (sets the field to 0).

Currently I am manually deleting the value with an UPDATE statement, but thats not how its meant to be I guess. Looks like old code from the area before NULL was possible in number fields.


#1 Updated by Nicole Cordes about 4 years ago

  • Status changed from New to Needs Feedback

Hi Klaus,

I'm not sure if I fully understand your problem. Can you please explain again

a) What are you trying to archive
b) How do you try it?
c) What happens instead?

Thank you for your help!

#2 Updated by Klaus Hinum about 4 years ago

I am trying to e.g. write NULL in a database field. The problem is, if I set a variable to NULL and write it to the database using process_datamap(); it is set to 0 altough NULL is allowed and possible in the typo3 backend. I guess there is a separate function to write NULL to the field, but I dont know why NULL and 0 are not differentiated by tce->... functions.
This should cover a) and c), how I try it is the code piece above with $data e.g. set to $data['field'] = null;

#3 Updated by Riccardo De Contardi almost 4 years ago

  • Status changed from Needs Feedback to New

#4 Updated by Susanne Moog over 2 years ago

  • Category set to DataHandler aka TCEmain

#5 Updated by Susanne Moog 3 months ago

  • Status changed from New to Needs Feedback

Hey, can you check what the backend form sends as post request / to the data handler in that case? as that works, the same thing should work for you.

Also available in: Atom PDF