Commit 2ed2346a authored by Carsten  Rose's avatar Carsten Rose
Browse files

#5306 / Exception: tt_content_uid wrong - fixed

parent 0c485484
......@@ -3190,7 +3190,7 @@ See also `downloadButton`_ to offer a download of an uploaded file.
If `downloadButton` ist empty, just shows the regular download glyph.
Additional attributes might be given like `downloadButton='t:Download|o:check file`. Please check `download`_.
Additional attributes might be given like `downloadButton = t:Download|o:check file`. Please check `download`_.
* fileSplit, fileDestinationSplit, tableNameSplit: see split-pdf-upload_
......@@ -3224,7 +3224,9 @@ Requires: *'upload'-FormElement.name = 'column name'* of an column in the primar
After moving the file to `fileDestination`, the current record/column will be updated to `fileDestination`.
The database definition of the named column has to be a string variant (varchar, text but not numeric or else).
On form load, the column value will be displayed as path/filename.
On form load, the column value will be displayed,
* as the whole value (pathFileName)
Deleting an uploaded file in the form (by clicking on the trash near beside) will delete
the file on the filesystem as well. The column will be updated to an empty string.
......
......@@ -26,17 +26,23 @@ class AbstractException extends \Exception {
* @return string
*/
public function formatException() {
$t3Vars = array();
$debug = '';
try {
// In a very early stage, it might be possible that Store can't be initialized: take care not to use it.
$store = Store::getInstance();
$t3Vars = $store->getStore(STORE_TYPO3);
} catch (UserFormException $e) {
$store = null;
} catch (CodeException $e) {
$store = null;
}
if (empty($t3Vars)) {
$t3Vars = T3Info::getVars();
}
$html = '';
$this->messageArray['File'] = $this->getFile();
......@@ -53,7 +59,6 @@ class AbstractException extends \Exception {
$html .= "Code: " . htmlspecialchars($this->messageArray['Code']) . "<br>";
$html .= "Message: " . Support::wrapTag("<strong>", htmlspecialchars($this->messageArray['Message'])) . "<br>";
$t3Vars = T3Info::getVars();
$html .= 'Page Id: ' . $t3Vars[TYPO3_PAGE_ID] . '<br>';
$html .= 'Content Id: ' . $t3Vars[TYPO3_TT_CONTENT_UID] . '<br>';
......
......@@ -25,7 +25,8 @@ class T3Info {
$t3vars[TYPO3_FE_USER_GROUP] = isset($GLOBALS["TSFE"]->fe_user->user["usergroup"]) ? $GLOBALS["TSFE"]->fe_user->user["usergroup"] : '';
$t3vars[TYPO3_TT_CONTENT_UID] = isset($GLOBALS["TSFE"]->page["uid"]) ? $GLOBALS["TSFE"]->page["uid"] : '';
// Will be set later
$t3vars[TYPO3_TT_CONTENT_UID] = 'no set yet';
$t3vars[TYPO3_PAGE_ID] = isset($GLOBALS["TSFE"]->id) ? $GLOBALS["TSFE"]->id : '';
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment