Bug #87970

Sites configuration module broken

Added by Joschi Kuphal 7 months ago. Updated 21 days ago.

Status:
Needs Feedback
Priority:
Must have
Assignee:
Category:
Link Handling, Site Handling & Routing
Start date:
2019-03-20
Due date:
% Done:

0%

TYPO3 Version:
9
PHP Version:
7.3
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

When trying to add a new site configuration via the Sites module by clicking the button "Add new site configuration for this site", the following error occurs:

The argument "parameters" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\Be\UriViewHelper".

The reason seems to be the wrongly escaped viewhelper argument parameters in /typo3/sysext/backend/Resources/Private/Templates/SiteConfiguration/Edit.html (see https://github.com/TYPO3/TYPO3.CMS/commit/0824e6e84b05d10fb431d9de308f37dbdce198b4#diff-3334d6ec7728df769c410043fd8ec672R3):

action="{f:be.uri(route:'site_configuration', parameters:{action: 'save'})}" 

Can be fixed by changing to:

action="{f:be.uri(route:'site_configuration', parameters:'{action: \'save\'}')}" 

typo3_error_report.png View (377 KB) Eugen Hollmann, 2019-04-30 11:01

typo3_error_access.png View (379 KB) Eugen Hollmann, 2019-04-30 11:01

typo3_error_sites.png View (404 KB) Eugen Hollmann, 2019-04-30 11:01


Related issues

Related to TYPO3 Core - Bug #88415: InvalidArgumentException in SiteConfiguration Needs Feedback 2019-05-22

History

#1 Updated by Claus Due 7 months ago

I'm not sure if that unquoted array syntax ever worked (as first-level VH parameter value) but I'll check up on that at the parser level.

To solve this though, and because it definitely is more appropriate, we should switch to the quoted version Josci echoed above and avoid this unquoted usage.

PS: if expressions become nasty with quotes:

{f:be.uri(route="site_configuration" parameters="{action: 'save'}") -> f:variable(name: 'actionUrl')}
<form action="{actionUrl}">

...can be used to reduce the quoting. Two things are going on there: first, the inline VH expression uses tag mode arguments which is allowed in recent Fluid versions. Second, the output of the expression is stored in a variable that's much easier to handle esp. if you have to output it twice or use it in a condition.

#2 Updated by Sven Juergens 6 months ago

hi

is this a fix that can go in TYPO3 9.5.6 ?

#3 Updated by Frank Naegler 6 months ago

  • Status changed from New to Accepted
  • Assignee set to Frank Naegler

#4 Updated by Frank Naegler 6 months ago

  • Status changed from Accepted to Needs Feedback

Hello Joschi,
I tried to reproduce the problem, but for me, it works well without exception.
Can you please provide some more information about your system: PHP Version, OX version?
Also, a screenshot of the exception or log entries and a stack trace could be helpful.

#5 Updated by Eugen Hollmann 6 months ago

Hi there,

I have the same issues in TYPO3 9.5.5 with different BE-Modules, including:
  • Site management > Sites > Edit
  • System > Access
  • System > Reports

But it only occurs with PHP 7.3 (fcgi).
If I set "AddHandler php72-fcgi .php" in my .htaccess, everything is working fine.
But with "AddHandler php73-fcgi .php" I get the errors.

Fix by @Joschi Kuphal is working, but I prefered a downgrade to PHP 7.2 for now.

#6 Updated by Frank Naegler 6 months ago

@Eugen: Thanks for the screenshots and information.

@Claus: Is fluid ready for PHP 7.3 or could this be the problem?

@Joschi: you reported the issue for PHP 7.2 is this correct or is it only an issue with PHP 7.3?

#7 Updated by Patrick Broens 6 months ago

I can reproduce this on PHP 7.3.3 FPM/FastCGI on Linux NGINX. I've solved this for our own custom extensions, but the following modules are suffering with the problem:
  • Site configuration > Edit
  • Redirects
  • Template tools (page zero)
  • Backend Users (only once, then again after cache clearing)
  • Backend pagination widget

We only use the package typo3/minimal with some additional core packages, so there might be more as Eugen Hollman is mentioning, like Reports.

On Apache using the 7.3.3 Apache 2.0 Handler, I do not have the problem

#8 Updated by Nikolas Hagelstein 6 months ago

Confirmed on:

TYPO3 9.5.5
PHP 7.3.2
SAPI FPM

Does not happen on the same Site running php 7.3.3 on FPM

So might be an PHP issue, but i am not sure i did not compare every single PHP setting.

#9 Updated by Patrick Broens 6 months ago

  • PHP Version changed from 7.2 to 7.3

Unfortunately, in contrast to what Nikolas Hagelstein is mentioning, it does not work for us at PHP 7.3.3 fcgi

#10 Updated by Benni Mack 6 months ago

  • Target version changed from next-patchlevel to Candidate for patchlevel

#11 Updated by Benjamin Serfhos 4 months ago

+1.

Having the same problem. Occurred on fresh installation.

Local environment:

TYPO3 Version: 9.5.7
Webserver: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.3.6
PHP Version: 7.3.6
Application Context: Development
Composer mode: Enabled
Operating System: Linux 3.10.0-957.5.1.el7.x86_64

Fixed it locally by using :
action="{f:be.uri(route:'site_configuration', parameters:'{action: \'save\'}')}"

#12 Updated by Simon Köhler 4 months ago

I had this problem now with a 9.5.8 on Mittwald Servers:

TYPO3 Version 9.5.8
Webserver Apache
PHP Version 7.3.2
Database (Default) MySQL 5.7.25
Application Context Production
Operating System Linux 2.6.32-openvz-042stab127.2-amd64

Fixed with the above code, thanks!

#13 Updated by Guido Schmechel 3 months ago

  • Related to Bug #88415: InvalidArgumentException in SiteConfiguration added

#14 Updated by Guido Schmechel 3 months ago

Patch added in the related issue.

#15 Updated by Jan Greth 21 days ago

Can also confirm bug:

Operating system: Unix
PHP version: 7.3.8
PHP CGI detected: No
Database connection 'Default'
Version: MySQL 5.5.62

Also available in: Atom PDF