Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
typo3
qfq
Commits
2e0fce29
Commit
2e0fce29
authored
Jun 12, 2018
by
Carsten Rose
Browse files
Bug #6216 / Oops, an error occurred! Code - unhandled exception will be caught now.
parent
124e18a4
Changes
4
Hide whitespace changes
Inline
Side-by-side
extension/Classes/Controller/QfqController.php
View file @
2e0fce29
...
...
@@ -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
=
''
;
...
...
extension/Documentation/Manual.rst
View file @
2e0fce29
...
...
@@ -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
:
20180612205917761
fc593
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
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
`
:
...
...
extension/qfq/qfq/exceptions/AbstractException.php
View file @
2e0fce29
...
...
@@ -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'> 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
;
}
...
...
extension/qfq/qfq/exceptions/UserFormException.php
View file @
2e0fce29
...
...
@@ -20,9 +20,6 @@ require_once(__DIR__ . '/AbstractException.php');
*/
class
UserFormException
extends
AbstractException
{
/*
* @return string HTML formatted error string
*/
/**
* @return string
* @throws CodeException
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment