Project

General

Profile

Actions

Bug #27957

closed

TCA tree somehow causes fatal error when using in inline record (IRRE)

Added by Thomas Deinhamer almost 13 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Must have
Category:
FormEngine aka TCEforms
Target version:
Start date:
2011-07-07
Due date:
% Done:

100%

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

Description

Hello folks!

When using the following configuration for
a select field rendered as tree, it's neither
possible to expand inline records, nor to create
new inline records, because the page renderer,
called through the AJAX request, throws an
exception - also mentioned below.

'included_categories' => array(
    'exclude' => 1,
    'label' => 'LLL:EXT:hype_store/Resources/Private/Language/locallang_db.xml:tx_hypestore_domain_model_discount.included_categories',
    'config' => array(
        'type' => 'select',
        'foreign_table' => 'tx_hypestore_domain_model_category',
        'MM' => 'tx_hypestore_relation_discount_category',
        'MM_opposite_field' => 'discounts',
        'MM_match_fields' => array(
            'exclude' => 0
        ),
        'minitems' => 0,
        'maxitems' => 999999,

        'renderMode' => 'tree',
        'treeConfig' => array(
            'parentField' => 'parent_category',
            'appearance' => array(
                'expandAll' => TRUE,
                'showHeader' => TRUE
            ),
        ),
    ),
)

The error thrown (ajax response) is...

#1284906026: Language and character encoding are not set.

... which occurs in the file class.t3lib_pagerenderer.php in line 1795.

If I remove the "TCA tree configuration" everything works. The tree also
works, if the record is opened directly. If opened as inline record,
the described behaviour occurs.


Files

T3X_inline500error.t3x (12.9 KB) T3X_inline500error.t3x Demo extension for TCA tree error 500 Alexander Jahn, 2011-10-04 12:02

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #35244: TCAtree inline record triggers Closed2012-03-26

Actions
Has duplicate TYPO3 Core - Bug #31640: TCA: IRRE Inline records + renderMode "tree" -> "Error 500, Internal Server Error"Closed2011-11-07

Actions
Actions #1

Updated by Thomas Deinhamer almost 13 years ago

Sorry, the code part seems to be corrupted, hope you get the point anyway.

Actions #2

Updated by Steffen Ritter almost 13 years ago

  • Category changed from 978 to FormEngine aka TCEforms
  • Status changed from New to Accepted
  • Assignee set to Steffen Ritter
Actions #3

Updated by Oliver Hader over 12 years ago

  • Target version changed from 4.5.4 to 4.5.6
Actions #4

Updated by Andreas Wolf over 12 years ago

  • Status changed from Accepted to Needs Feedback
  • Target version changed from 4.5.6 to 4.5.7

I could not reproduce this - maybe I'm missing some knowledge about the different IRRE ways here... could you provide a demo extension with a minimum required TCA to reproduce this?

Actions #5

Updated by Alexander Jahn over 12 years ago

It seems i've ran into the same issue today.
I threw together a simple demo extension as a demonstration. I guess my problem has the same cause as Thomas'.

Install the extension regularily and create a new tt_content record in some page.
Open record, then in tab 'ERROR 500 DEMO' create a new inline record
=> throws error 500, systemLog reports exception #1284906026

In tca.php disable rendering of tca tree in line 28 and creating / expanding of records works

In ext_tables.php line 19 set collapseAll to 0 and existing records show up fine when tca tree is used.

Actions #6

Updated by Chris topher over 12 years ago

  • Target version changed from 4.5.7 to 4.5.8
Actions #7

Updated by Georg Ringer over 12 years ago

just experienced that too with 4-5-8 ... this didn't occur in older versions of 4-5

Actions #8

Updated by Ernesto Baschny about 12 years ago

  • Target version changed from 4.5.8 to 4.5.12
Actions #9

Updated by Gerrit Code Review about 12 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9874

Actions #10

Updated by Laurent Cherpit about 12 years ago

Same problem with version 4.6 branch.

The charset property is not defined when the page renderer is cloned.

workaround would to set the charset:

    /**
     * Gets the JavaScript of the pageRenderer.
     * This can be used to extract newly added files which have been added
     * during an AJAX request. Due to the spread possibilities of the pageRenderer
     * to add JavaScript rendering and extracting seems to be the easiest way.
     *
     * @return string
     */
    protected function getJavaScriptAndStyleSheetsOfPageRenderer() {
        /** @var $pageRenderer t3lib_PageRenderer */
        $pageRenderer = clone $GLOBALS['SOBE']->doc->getPageRenderer();

        $pageRenderer->setCharSet($GLOBALS['LANG']->charSet);
        $pageRenderer->setTemplateFile(TYPO3_mainDir . 'templates/helper_javascript_css.html');
        $javaScriptAndStyleSheets = $pageRenderer->render();

        return $javaScriptAndStyleSheets;
    }

Actions #11

Updated by Gerrit Code Review about 12 years ago

Patch set 2 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9874

Actions #12

Updated by Gerrit Code Review about 12 years ago

Patch set 3 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9874

Actions #13

Updated by Gerrit Code Review about 12 years ago

Patch set 4 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9874

Actions #14

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_4-7 has been pushed to the review server.
It is available at http://review.typo3.org/14245

Actions #15

Updated by Gerrit Code Review over 11 years ago

Patch set 5 for branch master has been pushed to the review server.
It is available at http://review.typo3.org/9874

Actions #16

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_4-6 has been pushed to the review server.
It is available at http://review.typo3.org/14246

Actions #17

Updated by Gerrit Code Review over 11 years ago

Patch set 1 for branch TYPO3_4-5 has been pushed to the review server.
It is available at http://review.typo3.org/14247

Actions #18

Updated by Xavier Perseguers over 11 years ago

  • Status changed from Under Review to Resolved
  • Assignee changed from Steffen Ritter to Xavier Perseguers
  • Target version changed from 4.5.12 to 6.0.0-beta2
  • % Done changed from 0 to 100
Actions #19

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF