Project

General

Profile

Actions

Bug #24455

closed

htmlArea RTE: Fatal error on invoking the RTE

Added by Daniel Poetzinger almost 14 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Must have
Category:
-
Target version:
-
Start date:
2011-01-02
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
4.5
PHP Version:
Tags:
Complexity:
Is Regression:
Sprint Focus:

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

    1. enable borders on table creation
      buttons.toggleborders.setOnTableCreation = 1
    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

    1. add the defined classes
      proc.allowedClasses := addToList(i)
      classesParagraph := addToList()
      classesAnchor := addToList(i)
      classesCharacter = smallfont
      classesLinks := addToList(i)
      #classesTable := addToList()
      #classesTD :=addToList()
      classesAnchor.default >
    1. Enable operations on tables attributes
      disableSpacingFieldsetInTableOperations = 1
      disableAlignmentFieldsetInTableOperations = 0
      disableColorFieldsetInTableOperations = 1
      disableLayoutFieldsetInTableOperations = 1
      disableBordersFieldsetInTableOperations = 1
    1. Adjust Parsers to allow img and inlinestyle for p tags:
      proc{
    2. Allow img tags
      entryHTMLparser_db.tags.img >
    1. 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)


Files

rtehtmlarea_bugfix_16893_trunk.patch (658 Bytes) rtehtmlarea_bugfix_16893_trunk.patch Administrator Admin, 2011-01-07 04:29
Actions

Also available in: Atom PDF