Commit b3fe0ab8 authored by Carsten  Rose's avatar Carsten Rose
Browse files

#5367 / Error Report: 'full level' missing, content too much escaped: Fixed...

#5367 / Error Report: 'full level' missing, content too much escaped: Fixed too much escaping. Form / FormElement Links in error messages now with BS Buttons.
parent 7ca69f8a
......@@ -1321,7 +1321,7 @@ const EXCEPTION_REPORT_FULL_LEVEL = 'Report level key';
const EXCEPTION_SIP = 'current sip';
const EXCEPTION_PAGE_ID = 'Page Id';
const EXCEPTION_TT_CONTENT_UID = 'Content Id';
const EXCEPTION_EDIT_FORM = 'Edit form';
const EXCEPTION_EDIT_FORM = 'Edit';
const EXCEPTION_TIMESTAMP = 'Timestamp';
const EXCEPTION_CODE = 'Code';
......
......@@ -73,13 +73,6 @@ class AbstractException extends \Exception {
$arrDebugShow[EXCEPTION_PAGE_ID] = $t3Vars[TYPO3_PAGE_ID];
$arrDebugShow[EXCEPTION_TT_CONTENT_UID] = $t3Vars[TYPO3_TT_CONTENT_UID];
// In case there is a 'form' name given in SIP, we probably have a problem in a form and a direct link to
// edit the broken form will be helpful.
$storeSystem = $store->getStore(STORE_SYSTEM);
if (!empty($storeSystem[SYSTEM_FORM])) {
$arrDebugShow[EXCEPTION_EDIT_FORM] = $this->buildFormLink($storeSystem);
}
$arrDebugHidden = array();
$arrDebugHidden[EXCEPTION_FILE] = $this->getFile();
$arrDebugHidden[EXCEPTION_LINE] = $this->getLine();
......@@ -93,6 +86,13 @@ class AbstractException extends \Exception {
$arrDebugShow = OnArray::htmlentitiesOnArray($arrDebugShow);
$arrDebugHidden = OnArray::htmlentitiesOnArray($arrDebugHidden);
// In case there is a 'form' name given in SIP, we probably have a problem in a form and a direct link to
// edit the broken form will be helpful.
$storeSystem = $store->getStore(STORE_SYSTEM);
if (!empty($storeSystem[SYSTEM_FORM])) {
$arrDebugShow[EXCEPTION_EDIT_FORM] = $this->buildFormLink($storeSystem);
}
$htmlDebug = OnArray::arrayToHtmlTable($arrDebugShow, 'Debug', EXCEPTION_TABLE_CLASS);
$hidden = OnArray::arrayToHtmlTable($arrDebugHidden, 'Details', EXCEPTION_TABLE_CLASS);
......@@ -133,18 +133,21 @@ class AbstractException extends \Exception {
$link = new Link($sip);
// Link to 'Form'
$linkForm = $link->renderLink(TOKEN_SIP . '|' . TOKEN_PAGE . ':' . $storeSystem[SYSTEM_EDIT_FORM_PAGE] . '&' . CLIENT_FORM . '=' . FORM_NAME_FORM . '&' .
$linkForm = $link->renderLink(TOKEN_SIP . '|' . TOKEN_BOOTSTRAP_BUTTON . '|' . TOKEN_PAGE . ':' .
$storeSystem[SYSTEM_EDIT_FORM_PAGE] . '&' . CLIENT_FORM . '=' . FORM_NAME_FORM . '&' .
CLIENT_RECORD_ID . '=' . $r[F_ID] . '|' . TOKEN_TEXT . ':' . $storeSystem[SYSTEM_FORM]);
// Link to 'FormElement'
if (!empty($storeSystem[SYSTEM_FORM_ELEMENT_ID])) {
$linkFormElement = ' / ' . $link->renderLink(TOKEN_SIP . '|' . TOKEN_PAGE . ':' . $storeSystem[SYSTEM_EDIT_FORM_PAGE] . '&' . CLIENT_FORM . '=' . FORM_NAME_FORM_ELEMENT . '&' .
CLIENT_RECORD_ID . '=' . $storeSystem[SYSTEM_FORM_ELEMENT_ID] . '|' . TOKEN_TEXT . ':' . 'FormElement: ' . $storeSystem[SYSTEM_FORM_ELEMENT_ID]);
$linkFormElement = $link->renderLink(TOKEN_SIP . '|' . TOKEN_BOOTSTRAP_BUTTON . '|' . TOKEN_PAGE .
':' . $storeSystem[SYSTEM_EDIT_FORM_PAGE] . '&' . CLIENT_FORM . '=' . FORM_NAME_FORM_ELEMENT . '&' .
CLIENT_RECORD_ID . '=' . $storeSystem[SYSTEM_FORM_ELEMENT_ID] . '|' .
TOKEN_TEXT . ':' . $storeSystem[SYSTEM_FORM_ELEMENT_ID]);
}
} catch (\exception $e) {
}
return $linkForm . $linkFormElement;
return 'Form: ' . $linkForm . '   FormElement: ' . $linkFormElement;
}
}
\ No newline at end of file
......@@ -129,7 +129,9 @@ class OnArray {
*/
public static function varExportArray(array $arr) {
foreach ($arr as $key => $value) {
$arr[$key] = var_export($value, true);
if (is_array($value)) {
$arr[$key] = var_export($value, true);
}
}
return $arr;
......
Markdown is supported
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