Project

General

Profile

Actions

Bug #30687

closed

Localization of Inline Records not possible

Added by Matthias Krappitz about 13 years ago. Updated over 9 years ago.

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

0%

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

Description

Hi,

we got the following situation on latest stable core (4.5.6) - there are custom project records containing an irre (TCA type inline) field enabling editors to create tt_content records inline in the project records. All works fine within the default language. When localizing the project records the backend offers a link called "Localize all records". When clicking this, the server throws a 500 error.

This is the TCA configuration for the respective field:
...
'content' => array(
'exclude' => 0,
'label' => 'LLL:EXT:nhb/Resources/Private/Language/locallang_db.xml:tx_nhb_domain_model_project.content',
'config' => array(
'type' => 'inline',
'foreign_table' => 'tt_content',
'MM' => 'tx_nhb_domain_model_project_content_mm',
'maxitems' => 9999,
'appearance' => array(
'collapse' => 0,
'levelLinksPosition' => 'top',
'showSynchronizationLink' => 1,
'showPossibleLocalizationRecords' => 1,
'showAllLocalizationLink' => 1,
),
),
),
...

Clicking the link mentioned above calls the following URL:
http://www.someserver.com/typo3/ajax.php?ajaxID=t3lib_TCEforms_inline%3A%3AsynchronizeLocalizeRecords&ajax%5B0%5D=0&ajax%5B1%5D=data-10-tx_nhb_domain_model_project-95-content-tt_content&ajax%5B2%5D=localize

and outputs the following when $TYPO3_CONF_VARS['SYS']['devIPmask'] is set to my IP address and $TYPO3_CONF_VARS['SYS']['displayErrors'] is set to 2:

Uncaught TYPO3 Exception
#1: PHP Catchable Fatal Error: Argument 2 passed to t3lib_iconWorks::getSpriteIconForRecord() must be an array, boolean given, called in /nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_tceforms_inline.php on line 549 and defined in /nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_iconworks.php line 762

t3lib_error_Exception thrown in file
/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/error/class.t3lib_error_errorhandler.php in line 106.

10 t3lib_error_ErrorHandler::handleError(4096, "Argument 2 passed to t3lib_iconWorks::getSpriteIco….t3lib_tceforms_inline.php on line 549 and defined", "/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_iconworks.php", 762, array)

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_iconworks.php:

00760: * @access public
00761: */

00762: public static function getSpriteIconForRecord($table, array $row, array $options = array()) {

00763: $innerHtml = (isset($options['html']) ? $options['html'] : NULL);
00764: $tagName = (isset($options['tagName']) ? $options['tagName'] : NULL);

9 t3lib_iconWorks::getSpriteIconForRecord("tt_content", boolean, array)

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_tceforms_inline.php:

00547:
00548: $altText = t3lib_BEfunc::getRecordIconAltText($rec, $foreign_table);

00549: $iconImg = t3lib_iconWorks::getSpriteIconForRecord($foreign_table, $rec, array('title' => htmlspecialchars($altText), 'id' => $objectId . '_icon'));

00550: $label = '' . $recTitle . '';
00551: if (!$isVirtualRecord) {

8 t3lib_TCEforms_inline::renderForeignRecordHeader("95", "tt_content", boolean, array, boolean)

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_tceforms_inline.php:

00446: // set the record container with data for output
00447: $out = '
' . $fields . $combination . '
';

00448: $header = $this->renderForeignRecordHeader($parentUid, $foreign_table, $rec, $config, $isVirtualRecord);

00449: $out = '
' . $header . '
' . $out;
00450: // wrap the header, fields and combination part of a child record with a div container

7 t3lib_TCEforms_inline::renderForeignRecord("95", boolean, array)

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_tceforms_inline.php:

01375: $row = $this->getRecord($this->inlineFirstPid, $current['table'], $item);
01376: $selectedValue = ($foreignSelector ? "'" . $row[$foreignSelector] . "'" : 'null');

01377: $data .= $this->renderForeignRecord($parent['uid'], $row, $parent['config']);

01378: $jsonArrayScriptCall[] = "inline.memorizeAddRecord('$nameObjectForeignTable', '" . $item . "', null, $selectedValue);";
01379: // Remove possible virtual records in the form which showed that a child records could be localized:

6 t3lib_TCEforms_inline::getExecuteChangesJsonArray("86", "1,")

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_tceforms_inline.php:

01275: unset($tce);
01276:

01277: $jsonArray = $this->getExecuteChangesJsonArray($parentRecord[$parent['field']], $newItemList);

01278: $this->getCommonScriptCalls($jsonArray, $parent['config']);
01279: }

5 t3lib_TCEforms_inline::synchronizeLocalizeRecords("data-10-tx_nhb_domain_model_project-95-content-tt_content", "localize")

4 call_user_func_array(array, array)

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_tceforms_inline.php:

01022: $ajaxObj->setContentFormat('jsonbody');
01023: $ajaxObj->setContent(

01024: call_user_func_array(array(&$this, $ajaxMethod), $ajaxArguments)

01025: );
01026: break;

3 t3lib_TCEforms_inline::processAjaxRequest(array, TYPO3AJAX)

2 call_user_func_array(array, array)

/nhbkhthr/nhb2011/typo3_src-4.5.6/t3lib/class.t3lib_div.php:

05190: array(&$classObj, $parts1),
05191: array(&$params, &$ref)

05192: );

05193: } else {
05194: $errorMsg = "ERROR: No method name '" . $parts1 . "' in class " . $parts0;

1 t3lib_div::callUserFunction("t3lib/class.t3lib_tceforms_inline.php:t3lib_TCEforms_inline->processAjaxRequest", array, TYPO3AJAX, boolean, boolean)

/nhbkhthr/nhb2011/typo3_src-4.5.6/typo3/ajax.php:

00071: $ajaxObj->setError('No backend function registered for ajaxID "'.$ajaxID.'".');
00072: } else {

00073: $ret = t3lib_div::callUserFunction($ajaxScript, $ajaxParams, $ajaxObj, false, true);

00074: if ($ret === false) {
00075: $ajaxObj->setError('Registered backend function for ajaxID "'.$ajaxID.'" was not found.');

When $TYPO3_CONF_VARS['SYS']['displayErrors'] is set to 0, the output is the following JSON, but still nothing happens:

{"scriptCall":["\n\n\n\t\t\tTBE_EDITOR.loginRefreshed();\n\t\t"],"headData":[{"name":"LINK","attributes":{"rel":"stylesheet","type":"text\/css","href":"..\/typo3temp\/compressor\/merged-df2691402080162581a38d1f5db7ea2d-f217bfd801bcc0277ddc3e9eaccf8dad.css.gzip?1317992492","media":"all"},"innerHTML":false},{"name":"SCRIPT","attributes":{"src":"..\/typo3temp\/compressor\/modernizr.min-f82be2abe24742d12760fc8ac14ec9ef.js.gzip?1317992491","type":"text\/javascript"},"innerHTML":""}]}

If you need further information don't hesitate to ask. Sill am not sure how such a bug could stay unnoticed so long, so maybe there is somehting special with our installation.

Actions

Also available in: Atom PDF