--- class.tx_realurl.php.org 2011-02-03 15:16:56.000000000 +0100 +++ class.tx_realurl.php 2011-02-24 13:05:58.000000000 +0100 @@ -1767,15 +1767,19 @@ return $returnId; } else { // If no cached entry, look it up directly in the table: - - $fieldList[] = $cfg['id_field']; + + // store the result in a unique name provides problems with the form table.field + $fieldList[] = $cfg['id_field'] . ' AS temp'; $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(implode(',', $fieldList), $cfg['table'], $cfg['alias_field'] . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $cfg['table']) . ' ' . $cfg['addWhereClause']); $row = $GLOBALS['TYPO3_DB']->sql_fetch_assoc($res); $GLOBALS['TYPO3_DB']->sql_free_result($res); if ($row) { - $returnId = $row[$cfg['id_field']]; + $returnId = $row['temp']; // If localization is enabled, check if this record is a localized version and if so, find uid of the original version. if ($langEnabled && $row[$cfg['languageField']] > 0) { @@ -1801,7 +1805,8 @@ } else { // If no cached entry, look up alias directly in the table (and possibly store cache value) - $fieldList[] = $cfg['alias_field']; + // store the result in a unique name provides problems with the form table.field + $fieldList[] = $cfg['alias_field'] . ' AS temp'; $res = $GLOBALS['TYPO3_DB']->exec_SELECTquery(implode(',', $fieldList), $cfg['table'], $cfg['id_field'] . '=' . $GLOBALS['TYPO3_DB']->fullQuoteStr($value, $cfg['table']) . ' ' . $cfg['addWhereClause']); @@ -1827,11 +1832,11 @@ $mLength = $cfg['maxLength'] ? $cfg['maxLength'] : $this->maxLookUpLgd; if ($cfg['useUniqueCache']) { // If cache is to be used, store the alias in the cache: - $aliasBaseValue = $row[$cfg['alias_field']]; + $aliasBaseValue = $row['temp']; return $this->lookUp_newAlias($cfg, substr($aliasBaseValue, 0, $mLength), $value, $lang); } else { // If no cache for alias, then just return whatever value is appropriate: if (strlen($row[$cfg['alias_field']]) <= $mLength) { - return $row[$cfg['alias_field']]; + return $row['temp']; } else { return $value; }