Commit 731f9ae2 authored by Carsten  Rose's avatar Carsten Rose
Browse files

Fixes #8116: Error-Dialog - Button for FE element is broken. First problem:...

Fixes #8116: Error-Dialog - Button for FE element is broken. First problem: replacing '\n' with '<br>' failed for FE link. Second problem: FormEditor fixed in case missing {{formId:S}}.
parent e171b487
Pipeline #1854 passed with stage
in 2 minutes and 28 seconds
......@@ -129,8 +129,9 @@ class AbstractException extends \Exception {
$arrDebugHidden = OnArray::varExportArray($arrDebugHidden);
$arrDebugHidden[EXCEPTION_IP_ADDRESS] = $store->getVar(CLIENT_REMOTE_ADDRESS, STORE_CLIENT);
$arrDebugHidden[EXCEPTION_HTTP_USER_AGENT] = $store->getVar(CLIENT_HTTP_USER_AGENT, STORE_CLIENT, SANITIZE_ALLOW_ALLBUT);
$arrDebugHidden[EXCEPTION_QFQ_COOKIE] = $store->getVar(CLIENT_COOKIE_QFQ, STORE_CLIENT, SANITIZE_ALLOW_ALNUMX);
// No need for this information:
// $arrDebugHidden[EXCEPTION_HTTP_USER_AGENT] = $store->getVar(CLIENT_HTTP_USER_AGENT, STORE_CLIENT, SANITIZE_ALLOW_ALLBUT);
// $arrDebugHidden[EXCEPTION_QFQ_COOKIE] = $store->getVar(CLIENT_COOKIE_QFQ, STORE_CLIENT, SANITIZE_ALLOW_ALNUMX);
// Debug Information
if (Support::findInSet(SYSTEM_SHOW_DEBUG_INFO_YES, $store->getVar(SYSTEM_SHOW_DEBUG_INFO, STORE_SYSTEM))) {
......@@ -154,14 +155,17 @@ class AbstractException extends \Exception {
$arrMerged[EXCEPTION_SQL_FINAL] = $this->sqlHighlightError($arrMerged[ERROR_MESSAGE_OS], 'mysqli: 1054', $arrMerged[EXCEPTION_SQL_FINAL], "Unknown column '", "' in '");
}
foreach ($arrMerged as $key => $value) {
$arrMerged[$key] = str_replace("\n", "<br>", $arrMerged[$key]);
}
$htmlDebug = OnArray::arrayToHtmlTable(
array_merge($arrForm, $arrMerged),
'Debug', EXCEPTION_TABLE_CLASS);
$htmlDebug = str_replace("\n", "<br>", $htmlDebug);
$arrDebugHiddenClean = OnArray::htmlentitiesOnArray($arrDebugHidden);
$arrDebugHiddenClean[EXCEPTION_STACKTRACE] = implode($arrTrace, '<br>');
$arrDebugHiddenClean[EXCEPTION_EDIT_FORM] = implode($arrTrace, '<br>');
// $arrDebugHiddenClean[EXCEPTION_EDIT_FORM] = implode($arrTrace, '<br>');
$hidden = OnArray::arrayToHtmlTable($arrDebugHiddenClean, 'Details', EXCEPTION_TABLE_CLASS);
// Show / hide with just CSS: http://jsfiddle.net/t5Nf8/1/
......
......@@ -321,7 +321,7 @@ INSERT INTO FormElement (formId, name, label, mode, type, checkType, class, ord,
bsNoteColumns, modeSql, placeholder, encode)
VALUES (2, 'feIdContainer', 'Container', 'show', 'select', 'all', 'native', 120, 0, 0,
'<a href="{{documentation:Y}}#class-container">Info</a>', '',
'{{feIdContainer:R:::{{SELECT fe.feIdContainer FROM FormElement AS fe WHERE fe.formId={{formId:S}} AND fe.feIdContainer!=0 ORDER BY fe.modified DESC LIMIT 1}}}}',
'{{feIdContainer:R:::{{SELECT fe.feIdContainer FROM FormElement AS fe WHERE fe.formId={{formId:SR0}} AND fe.feIdContainer!=0 ORDER BY fe.modified DESC LIMIT 1}}}}',
'{{!SELECT fe.id, CONCAT(fe.type, " / ", fe.name, " (", COUNT(feSub.id), ")" ) FROM FormElement As fe LEFT JOIN FormElement As feSub ON feSub.feIdContainer=fe.id WHERE fe.formId={{formId:SR0}} AND fe.class="container" GROUP BY fe.id ORDER BY fe.type, fe.ord, fe.name }}',
'emptyItemAtStart',
100, '', 'no', '', '', '',
......
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