Project

General

Profile

Actions

Bug #90863

closed

htmlspecialchars() expects parameter 1 to be string, null given

Added by Eckard Gehrke over 4 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
Start date:
2020-03-27
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
10
PHP Version:
7.4
Tags:
Complexity:
Is Regression:
Yes
Sprint Focus:

Description

Hi
when upgrading from 9.5 to 10.3 I have issues with my form. It is displayed in frontend but in backend I get an error in preview processing:

(1/1) TypeError
htmlspecialchars() expects parameter 1 to be string, null given

in C:\..\typo3\sysext\form\Classes\Hooks\FormPagePreviewRenderer.php line 63 (last shown line).

array &$row
) {
if ($row['CType'] === 'form_formframework') {
$contentType = $parentObject->CType_labels[$row['CType']];
$itemContent .= $parentObject->linkEditContent('<strong>' . htmlspecialchars($contentType) . '</strong>

I guess $contentType is not set.
When I replace in last shown line $contentType with ' ' then in backend page content is shown again.
Unfortunately I do not know why $contentType is null, if that is an error or the error is that this case was not htought about in above coding. Maybe I have to redo my formsettings? If you need more information on how to reproduce let me know.
Best regards
Eckard


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #90598: Initialize emulated PageLayoutView before calling hooksClosed2020-02-29

Actions
Actions #1

Updated by Christian Eßl over 4 years ago

Can you try latest master? This should be fixed already with #90598.

Actions #2

Updated by Christian Eßl over 4 years ago

  • Related to Bug #90598: Initialize emulated PageLayoutView before calling hooks added
Actions #3

Updated by Christian Eßl over 4 years ago

If it's not possible to use latest master, you can temporarily switch off the new fluidbased page layout (Module Settings -> Feature Toggles -> Fluid based page module) to get the page module working again with form content types.

Actions #4

Updated by Eckard Gehrke over 4 years ago

Hi Christian,

thanks for the hint I tried with latest master and it works. From my side you can close the ticket.

Best regards
Eckard.

Actions #5

Updated by Riccardo De Contardi over 4 years ago

maybe is the same as #90828?

Actions #6

Updated by Georg Ringer over 4 years ago

  • Status changed from New to Closed

Closed as duplicate

Actions

Also available in: Atom PDF