You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I sometimes get a warning and and error when opening the page exporter. It happens after I added a rich text content with text and image. But it doesn't happen always. The warning part:
PHP Warning: array_merge(): Expected parameter 2 to be an array, string given in (...)/myproject/public/typo3/sysext/impexp/Classes/Export.php line 700
This is the typo3 code. I set a debugger breakpoint at line 700:
protectedfunction flatSoftRefs(array$relations): array
{
$list = [];
foreach ($relationsas$field => $relation) {
if (is_array($relation['softrefs']['keys'] ?? null)) {
foreach ($relation['softrefs']['keys'] as$spKey => $elements) {
foreach ($elementsas$subKey => $el) {
$lKey = $field . ':' . $spKey . ':' . $subKey;
// Line 700:$list[$lKey] = array_merge(['field' => $field, 'spKey' => $spKey], $el);
// Add file_ID key to header - slightly "risky" way of doing this because if the calculation// changes for the same value in $this->records[...] this will not work anymore!if ($el['subst']['relFileName'] ?? false) {
$list[$lKey]['file_ID'] = md5(Environment::getPublicPath() . '/' . $el['subst']['relFileName']);
}
}
}
}
array_merge tries to merge with $el which contains:
Confirm: with latest TYPO3 11LTS and PHP 8.1
Steps to reproduce: have a page with a tt_content element with an RTE image. Open export via right click context menu on page, get Exception
rtehtmlarea_images is the only non-core soft reference parser in the system.
Typo3 version: 11.5.9
Extension version: master 20297bb
I sometimes get a warning and and error when opening the page exporter. It happens after I added a rich text content with text and image. But it doesn't happen always. The warning part:
This is the typo3 code. I set a debugger breakpoint at line 700:
array_merge
tries to merge with$el
which contains:I can also see this structure in a successful export:
It seems the exporter expects an array for softref_element "content".
After this warning I get an error 500:
Related code from exporter:
In this case the content entry is
null
where an array is expected by the exporter:I think this code from t3x-rte_ckeditor_image is related:
Maybe this is an exporter issue if string/null is allowed where it expects arrays. Unfortunately I don't know much about how this works...
The text was updated successfully, but these errors were encountered: