getRecordFromDatabase($result['tableName'], $result['vanillaUid']); if (!array_key_exists('pid', $databaseRow)) { throw new \UnexpectedValueException( 'Parent record does not have a pid field', 1437663061 ); } if ($result['tcaSchemata']->has($result['tableName']) && $result['tcaSchemata']->get($result['tableName'])->hasCapability(TcaSchemaCapability::Workspace) && VersionState::tryFrom($databaseRow['t3ver_state'] ?? 0) === VersionState::DELETE_PLACEHOLDER ) { // Workspace delete placeholder records (t3ver_state = 2) should never be edited. This is a fallback // to suppress editing in case something still links to FormEngine edit of such a record. throw new DatabaseRecordWorkspaceDeletePlaceholderException( 'Record with uid "' . $databaseRow['uid'] . '" from table "' . $result['tableName'] . '" is' . ' a workspace delete placeholder record which can not be edited.', 1608658396, $result['tableName'], (int)$databaseRow['uid'] ); } $result['databaseRow'] = $databaseRow; return $result; } }