Issue Bug Closed

#24455htmlArea RTE: Fatal error on invoking the RTE

Daniel Poetzinger 01/02/11, 22:29 updated 03/29/11, 23:47

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;

################################################
  1. 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
}
} ################################################
  1. Remove the default link styles form
  2. link-wizard (popup)
    #
    RTE.default {
    classesAnchor >
    classesLinks >
    }
################################################
  1. configuration of RTE
    #
    RTE.default {
    contentCSS = EXT:mytemplateextension/css/rte.default.css

enableWordClean = 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 >
}
}
}

(issue imported from #M16893)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.