TCA tree somehow causes fatal error when using in inline record (IRRE)
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.
Updated by Andreas Wolf over 9 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?
Updated by Alexander Jahn over 9 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.
Updated by Laurent Cherpit almost 9 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: