[TYPO3-core] RFC: #12614: Debug output destroys BE HTML

Ivan Kartolo ivan.kartolo at dkd.de
Tue Nov 17 12:28:12 CET 2009


Hi Steffen,

Steffen Kamper schrieb:
> Hi,
> 
> This is SVN patch request.
> 
> Type: Bugfix
> 
> Branches: trunk
> 
> BT reference: http://bugs.typo3.org/view.php?id=12614
> 
> Problem:
> if you use t3lib_div::debug in BE the HTML is corrupted, docheader not
> clickable etc. It's very weird.
> 
> Reason is that t3lib_div::debug use "echo" which doesn't respect any
> output.
> 
> Solution:
> use flash messages. Ensure that the flag "showFlashMessage" is
> respected, that modern modules with templates render their flashmessage
> in modulebody, that old modules get the flash messages too, that FE
> output shows debug too.
> 
> It also respect all settings and debug handlers, as t3lib_div::debug is
> used as "last" output of debug
> 
> vg Steffen
> 

I created a new backend module with kickstarter (the old one, not mvc
and not extbase). You put the renderFlashMessages in two places:
1. class.t3lib_pagerenderer.php (render function)
2. template.php (startPage function)

for extension, which is created by the old kickstarter, at the time
these functions are called, the flashMessages are empty.

These two functions are called in the main function of the BE-module
index.php. After that then the moduleContent (here are the most debug
function being called). After that printContent function is being called
and the $this->doc->endPage().

the only place to put renderFlashMessages is in the endPage function of
template.php. It means all debug output will be put at the end of a
module (not at the top).

regards,

Ivan


-- 
Ivan Kartolo
Certified TYPO3 Integrator

Want to support the development of Direct Mail?
- Report some bugs (http://bugs.typo3.org)
- Send me patch
- Send me some donation per PayPal to ivan.kartolo(at)gmail(dot)com


More information about the TYPO3-team-core mailing list