Issue Bug Closed

#17043Hook processDatamap_afterDatabaseOperations bug with inline relations?

Stefano Cecere 02/26/07, 21:53 updated 06/27/08, 10:51

Description

i am using the hook processDatamap_afterDatabaseOperations to process a field in a custom table, where i have an inline relation with another table.

the value of this calculated field is based on the NUMBER of linked (by inline relations) records.

the problem is this:

whenever i add or remove an inline relationed record, and save the form, my calculated field is wrong: my function (which counts the linked records with a simple query) gets the PREVIUOS count of linkied records…

it seems that the inline relationschip db updates happen AFTER the hook is called…
the proof is that if i RE-SAVE the form, the field gets a correct value.

i looked into class.t3lib_tcemain.php and i think that the problem is in the loop around all the tables to be updated… i think that the main table gets updated first… so it call my hook/function.. then it updated the inline relationed table

any comment/ideas?

(issue imported from #M5074)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.