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

Bug #6216 / Oops, an error occurred! Code - unhandled exception will be caught now.

parent 124e18a4
......@@ -13,8 +13,17 @@ require_once(__DIR__ . '/../../qfq/qfq/exceptions/UserReportException.php');
require_once(__DIR__ . '/../../qfq/qfq/exceptions/CodeException.php');
require_once(__DIR__ . '/../../qfq/qfq/exceptions/DbException.php');
/**
* Class QfqController
* @package IMATHUZH\Qfq\Controller
*/
class QfqController extends \TYPO3\CMS\Extbase\Mvc\Controller\ActionController {
/**
* @return string
* @throws qfq\CodeException
* @throws qfq\UserFormException
*/
public function showAction() {
$origErrorReporting = '';
......
......@@ -6923,7 +6923,18 @@ The browser shows a red popup with 'Internal Server Error'. The message is gener
request response of QFQ (=Server) is broken. This might happen e.g. if PHP can't start successfully or PHP fails to run
due to a missing php module or broken configuration.
Oops, an error occurred! Code: 20180612205917761fc593
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
You see this message on all places where a QFQ content record should produce some output. Typically the extension fails
to load. If the error message disappears when the QFQ extension is disabled (instead a message `qfq_qfq can't be rendered`
is shown), than QFQ is the problem.
Search the given code in `typo3temp/logs/*`, in this example 20180612205917761fc593. You'll should find a stacktrace with
a more detailed message.
The error might occur if there are problematic characters in config.qfq.ini, like single or double ticks inside strings,
wich are not enclosed (correctly).
.. _`javascriptProblem`:
......
......@@ -48,6 +48,8 @@ class AbstractException extends \Exception {
$t3Vars = $store->getStore(STORE_TYPO3);
} catch (CodeException $e) {
$store = null;
} catch (\Exception $exception){
$store = null;
}
if (empty($t3Vars)) {
......@@ -66,9 +68,6 @@ class AbstractException extends \Exception {
}
}
// $html .= "Code: " . htmlspecialchars($this->messageArray['Code']) . "<br>";
// $html .= "Message: " . Support::wrapTag("<strong>", htmlspecialchars($this->messageArray['Message'])) . "<br>";
// Debug Information
if ($store !== null && Support::findInSet(SYSTEM_SHOW_DEBUG_INFO_YES, $store->getVar(SYSTEM_SHOW_DEBUG_INFO, STORE_SYSTEM))) {
......@@ -103,7 +102,6 @@ class AbstractException extends \Exception {
$htmlDebug = OnArray::arrayToHtmlTable($arrDebugShow, 'Debug', EXCEPTION_TABLE_CLASS);
$hidden = OnArray::arrayToHtmlTable($arrDebugHidden, 'Details', EXCEPTION_TABLE_CLASS);
// $hidden = 'mein test<br>und mehr content';
// Show / hide with just CSS: http://jsfiddle.net/t5Nf8/1/
$htmlDebug .= "<style>input[type=checkbox]:checked + label + table { display: none; }</style>" .
"<input type='checkbox' checked id='stacktrace'><label for='stacktrace'>&nbsp;Show/hide more details</label>$hidden";
......@@ -112,10 +110,6 @@ class AbstractException extends \Exception {
// Sanitize any HTML content.
$arrShow = OnArray::htmlentitiesOnArray($arrShow);
$html = OnArray::arrayToHtmlTable($arrShow, 'Error', EXCEPTION_TABLE_CLASS);
// foreach ($show as $key => $value) {
// $html .= "$key: " . Support::wrapTag("<strong>", $value) . "<br>";
// }
// $html ='Houston, we have a problem';
return $html . $htmlDebug;
}
......
......@@ -20,9 +20,6 @@ require_once(__DIR__ . '/AbstractException.php');
*/
class UserFormException extends AbstractException {
/*
* @return string HTML formatted error string
*/
/**
* @return string
* @throws CodeException
......
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