[TYPO3-core] RFC #4405: Bug: SQL errors with foreign_table_where and ###REC_FIELD_*### marker
Martin Kutschker
masi-no at spam-typo3.org
Sun Jul 5 22:34:34 CEST 2009
Andreas Otto schrieb:
> Martin Kutschker wrote:
>> Why 0? This would only make sense for numerical fields.
>
> That's true.
>
>> Perhaps it would be better to add a special where clause for new records.
>
> Well, just point me to the right direction and I will see if I can
> create a new patch.
Somewhere (tceforms?) a code has to evaluate "foreign_table_where". The
idea is to use "foreign_table_where_for_new_records" if present and the
record to be shown is new.
> We could also stick with Steffen Kamper's workaround,
> CAST('###REC_FIELD_sys_language_uid###' AS UNSIGNED), and close the bug
> report right away - but this workaround has to be documented clearly in
> doc_core_api.
This seems to be really field specific. But another solution would be to
look up the field type in the TCA. If it's numeric cast it otherwise
replace as-is.
Masi
More information about the TYPO3-team-core
mailing list