Issue Bug Closed

#31757Foreign field as label for relation

Michel Georgy 11/11/11, 15:18 updated 10/02/18, 12:19

Description

There seems to be a little Problem if you work with versioning/workspaces and have a intermediate table where
the label of this table is a foreign field.

If you create a new version in DRAFT Workspace there will be generated 2 records in database, an actual draft version and
a placeholder. And here’s the problem in “class.t3lib_tcemain.php:883”:

$newVersion_placeholderFieldArray[$TCA[$table][‘ctrl’][‘label’]] = ‘[PLACEHOLDER, WS#’ . $this->BE_USER->workspace . ‘]’;

As the label is a foreign field and therefore just a integer in our case, a flashmessage error is shown because insertDB now tries to
save a string value (“PLACEHOLDER, WS#1”) to the Integer field and the checkStoredRecord method fails.

Reviews 3