From: Ingo Renner Date: Sun, 19 Feb 2012 18:57:54 +0000 (+0100) Subject: [FEATURE] Link errors in Template Object Browser to Template Analyzer X-Git-Tag: TYPO3_4-7-0beta1~26 X-Git-Url: http://git.typo3.org/Packages/TYPO3.CMS.git/commitdiff_plain/ff0f3606fa8add1cb23db4a1ba83465d45213684 [FEATURE] Link errors in Template Object Browser to Template Analyzer The Template Object Browser displays error messages about issues the template parser found when parsing the TypoScript configuration. These error messages include the line number where the error occured. However, these numbers do not correspond to line numbers in TypoScript records or files. The Template Ananlyzer however provides the "correct" line numbers. A link to the Template Analyzer and the line number in the overall TypoScript configuration helps to easily find the error. Change-Id: If4773dce961aae7888638e694c87755a719a016d Resolves: #34099 Releases: 4.7 Reviewed-on: http://review.typo3.org/9112 Reviewed-by: Philipp Gampe Tested-by: Philipp Gampe Reviewed-by: Georg Ringer Reviewed-by: Tolleiv Nietsch Tested-by: Tolleiv Nietsch --- diff --git a/t3lib/class.t3lib_tsparser_ext.php b/t3lib/class.t3lib_tsparser_ext.php index 7e604836b01e..8216b0f088a1 100644 --- a/t3lib/class.t3lib_tsparser_ext.php +++ b/t3lib/class.t3lib_tsparser_ext.php @@ -679,12 +679,12 @@ class t3lib_tsparser_ext extends t3lib_TStemplate { /** * [Describe function...] * - * @param [type] $ln: ... + * @param integer $lineNumber Line Number * @param [type] $str: ... - * @return [type] ... + * @return string */ - function ext_lnBreakPointWrap($ln, $str) { - return '' . $str . ''; + function ext_lnBreakPointWrap($lineNumber, $str) { + return '' . $str . ''; } /** diff --git a/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php b/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php index 65d63b2ea8d3..21eb54a8b424 100644 --- a/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php +++ b/typo3/sysext/tstemplate_objbrowser/class.tx_tstemplateobjbrowser.php @@ -458,8 +458,17 @@ class tx_tstemplateobjbrowser extends t3lib_extobjbase { $pEkey = ($bType=="setup"?"config":"constants"); if (count($tmpl->parserErrors[$pEkey])) { $errMsg=array(); + $templateAnalyzerInstalled = t3lib_extMgm::isLoaded('tstemplate_analyzer'); + foreach ($tmpl->parserErrors[$pEkey] as $inf) { - $errMsg[]=($inf[1]).":    ".$inf[0]; + $errorLink = ''; + if ($templateAnalyzerInstalled) { + $errorLink = ' ' + . $GLOBALS['LANG']->getLL('errorShowDetails') + . ''; + } + + $errMsg[] = ($inf[1]) . ":    " . $inf[0] . $errorLink; } $theOutput .= $this->pObj->doc->spacer(10); diff --git a/typo3/sysext/tstemplate_objbrowser/locallang.xlf b/typo3/sysext/tstemplate_objbrowser/locallang.xlf index d1d8e87e4779..d78b4542ba47 100644 --- a/typo3/sysext/tstemplate_objbrowser/locallang.xlf +++ b/typo3/sysext/tstemplate_objbrowser/locallang.xlf @@ -93,6 +93,9 @@ Errors and warnings + + Show details + Remove key from OL