Bug #24455
closedhtmlArea RTE: Fatal error on invoking the RTE
0%
Description
#1: PHP Catchable Fatal Error: Argument 1 passed to t3lib_div::removeDotsFromTS() must be an array, string given, called in /var/www/latest/typo3_src-4.5.beta/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php on line 1052 and defined in /var/www/latest/typo3_src-4.5.beta/t3lib/class.t3lib_div.php line 2245
t3lib_error_Exception thrown in file
/var/www/latest/typo3_src-4.5.beta/t3lib/error/class.t3lib_error_errorhandler.php in line 106.
11 t3lib_error_ErrorHandler::handleError(4096, "Argument 1 passed to t3lib_div::removeDotsFromTS()…s.tx_rtehtmlarea_base.php on line 1052 and defined", "/var/www/latest/typo3_src-4.5.beta/t3lib/class.t3lib_div.php", 2245, array)
/var/www/latest/typo3_src-4.5.beta/t3lib/class.t3lib_div.php:
02243: * @return array TypoScript configuration array without dots at the end of all keys
02244: */
02245: public static function removeDotsFromTS(array $ts) {
02246: $out = array();
02247: foreach ($ts as $key => $value) {
10 t3lib_div::removeDotsFromTS("h4, h5, h6")
/var/www/latest/typo3_src-4.5.beta/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php:
01050: */
01051: function buildNestedJSArray($conf) {
01052: $convertedConf = t3lib_div::removeDotsFromTS($conf);
01053: if ($this->is_FE()) {
01054: $GLOBALS['TSFE']->csConvObj->convArray($convertedConf, ($GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] ? $GLOBALS['TYPO3_CONF_VARS']['BE']['forceCharset'] : 'iso-8859-1'), 'utf-8');
9 tx_rtehtmlarea_base::buildNestedJSArray("h4, h5, h6")
/var/www/latest/typo3_src-4.5.beta/typo3/sysext/rtehtmlarea/class.tx_rtehtmlarea_base.php:
00860: $button = substr($buttonIndex, 0, -1);
00861: $configureRTEInJavascriptString .= '
00862: RTEarea[editornumber].buttons.'.$button.' = ' . $this->buildNestedJSArray($conf) . ';';
00863: }
00864: }
Happens on editing Contentelements.
I guess the Page Tsconfig is required to reproduce;
################################################- define some classes for RTE
#
RTE.classes {
smallfont {
name = Small grey font
value = font-size: 10px; color: #777788
}
ruleafter {
name = Linie after paragraph
value = border-bottom: 1px dotted #777788; margin-bottom: 3px; padding-bottom: 3px
}
}RTE.classesAnchor {
more {
class = more
type = page
}downloads {
class = downloads
type = page
}
}
- Remove the default link styles form
- link-wizard (popup)
#
RTE.default {
classesAnchor >
classesLinks >
}
- configuration of RTE
#
RTE.default {
contentCSS = EXT:mytemplateextension/css/rte.default.cssenableWordClean = 1
- enable borders on table creation
buttons.toggleborders.setOnTableCreation = 1
- add u and underline:
removeTags := removeFromList(u)
showButtons = bold,underline,strikethrough,underline,chMode,image,link, formatblock
proc.entryHTMLparser_db.removeTags := removeFromList(u)buttons.formatblock.orderItems = p, h1, h2, h3
buttons.formatblock.removeItems = h4, h5, h6
buttons.hidePStyleItems = h4, h5, h6- add the defined classes
proc.allowedClasses := addToList(i)
classesParagraph := addToList()
classesAnchor := addToList(i)
classesCharacter = smallfont
classesLinks := addToList(i)
#classesTable := addToList()
#classesTD :=addToList()
classesAnchor.default >
- Enable operations on tables attributes
disableSpacingFieldsetInTableOperations = 1
disableAlignmentFieldsetInTableOperations = 0
disableColorFieldsetInTableOperations = 1
disableLayoutFieldsetInTableOperations = 1
disableBordersFieldsetInTableOperations = 1
- Adjust Parsers to allow img and inlinestyle for p tags:
proc{ - Allow img tags
entryHTMLparser_db.tags.img >
- to allow inline style in p tags (aligning)
keepPDIVattribs = xml:lang,style,class
entryHTMLparser_db.tags {
span.fixAttrib.style.unset >
p.fixAttrib.style.unset >
p.fixAttrib.align.unset >
p.fixAttrib.class.unset >
}
}
} - enable borders on table creation
(issue imported from #M16893)
Files
Updated by Oliver Hader almost 14 years ago
Hi Daniel,
is there something else required to reproduce this behaviour (e.g. a link-handler, etc.)? I was not able to reproduce this with a regular plain TYPO3 installation. Maybe it's enough to check for is_array() before passing the accordant variable to t3lib_div::removeDotsFromTS()...
Thanks in advance for your feedback!
Updated by Stanislas Rolland almost 14 years ago
The offending line in Page TSConfig is
buttons.hidePStyleItems = h4, h5, h6
The statement is not valid because hidePStyleItems is not a button name. This should be simply:
hidePStyleItems = h4, h5, h6
The attached patch will ignore the statement.
Updated by Stanislas Rolland almost 14 years ago
Thanks for testing this beta.
Attached patch committed to SVN TYPO3core trunk (revision 10003).