Bug #22994
closedDatabase context in userFunc
0%
Description
It seams when using cObject USER the userfunc doesn't respect the database context. I've got the following TS snippet:
foo = USER
foo {
userFunc = user_bar_userfuncs->user_bar_numberFormat
titleField = TEXT
titleField.field = title
}
Within the userFunc I'm having the following code:
$titleField = $local_cObj->cObjGetSingle($conf['titleField'], $conf['titleField.']);
The script is expected to return the uid of the content element respectively the tt_news uid. But it returns the page uid. This is a strange behaviour. Quite often I'm having this problem. So I'm suggesting the following.
Is it possible to extend the functionality of .field? It would be great if one could write something like .field = tableName.fieldName. This would help to get the data from the expected table.
What do you think?
(issue imported from #M14862)