[TYPO3-bugs] RFC: Bug 4446 tcemain: Hook processDatamap_afterDatabaseOperations and insert operations

Ingo Schmitt mailinglisten at i-schmitt.de
Wed Feb 7 20:36:17 CET 2007


Hi Ingmar,

if a change of the existing hook is not possible, it would be great to 
introduce a new one, with the changed functionality.

Regards

ingo

> Hi Ingo
> 
> thanks for the patch!
> 
> Here's what I sent to the core list (watch the "Remark" below):
> 
> ----------------------------------------------------------------------
> 
> This is a SVN patch request.
> 
> Type: Bugfix
> by Ingo Schmitt
> 
> Description:
> When the hook processDatamap_afterDatabaseOperations is used after an
> INSERT operation not the new insert_id is given to the hook as $id but
> the temporary NEW...... ID.
> 
> Solution:
> Sinve the function insertDB already returns the new insert_id, the new
> ID should be stored in $id, to have it availiabe in the hook.
> 
> Remark:
> There is the slight probability of breaking backwards compatibility as
> people could have translated the NEW... id themselves in their hook
> functions using the $this->substNEWwithIDs array. However, it makes much
> more sense to directly pass the real insert id to the hook.
> 
> Branches: Trunk only.
> 
> Bugtracker reference:
> http://bugs.typo3.org/view.php?id=4446
> 
> cheers
> Ingmar
> 
> ----------------------------------------------------------------------
> 
> Ingo Schmitt schrieb:
> 
>>Type: Bugfix
>>
>>Description:
>>When using the hook processDatamap_afterDatabaseOperations to execute
>>your own code after the database operation, not the new insert_id ist
>>given to the hook, but the temporarily ID NEW...... . So you can't refer
>>to this new id.
>>
>>Sinve insertDB already returns the new insert_id, the new ID should be
>>stored in $id, to have it availiabe in the hook.
>>
>>Branches: 4.0.4, 4.1 Beta 3
>>
>>Patch is attached to:
>>http://bugs.typo3.org/view.php?id=4446
>>
>>
>>Regards
>>
>>ingo
>>
>>
>>
>>Mit freundlichen Gruessen
> 
> 
> 


Mit freundlichen Gruessen
-- 
Ingo Schmitt                        mailto:is at marketing-factory.de
Marketing Factory Consulting GmbH   http://typo3.marketing-factory.de/
Content Management mit Typo3: Beratung - Schulung - Realisierung


More information about the TYPO3-team-bugs mailing list