Project

General

Profile

Actions

Bug #87970

closed

Sites configuration module broken

Added by Joschi Kuphal about 5 years ago. Updated over 4 years ago.

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

100%

Estimated time:
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\'}')}" 

Files

typo3_error_report.png (377 KB) typo3_error_report.png Eugen Hollmann, 2019-04-30 11:01
typo3_error_access.png (379 KB) typo3_error_access.png Eugen Hollmann, 2019-04-30 11:01
typo3_error_sites.png (404 KB) typo3_error_sites.png Eugen Hollmann, 2019-04-30 11:01

Related issues 2 (0 open2 closed)

Related to TYPO3 Core - Bug #88415: InvalidArgumentException in SiteConfigurationClosed2019-05-22

Actions
Related to TYPO3 Core - Bug #87573: TYPO3 CMS Exception 1256475113 in Extension ManagerClosed2019-01-29

Actions
Actions #1

Updated by Claus Due about 5 years 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.

Actions #2

Updated by Sven Juergens almost 5 years ago

hi

is this a fix that can go in TYPO3 9.5.6 ?

Actions #3

Updated by Frank Nägler almost 5 years ago

  • Status changed from New to Accepted
  • Assignee set to Frank Nägler
Actions #4

Updated by Frank Nägler almost 5 years 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.

Updated by Eugen Hollmann almost 5 years 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 @Johannes Schmidt Kuphal is working, but I prefered a downgrade to PHP 7.2 for now.

Actions #6

Updated by Frank Nägler almost 5 years ago

@Eugen: Thanks for the screenshots and information.

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

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

Actions #7

Updated by Patrick Broens almost 5 years 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

Actions #8

Updated by Nikolas Hagelstein almost 5 years 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.

Actions #9

Updated by Patrick Broens almost 5 years 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

Actions #10

Updated by Benni Mack almost 5 years ago

  • Target version changed from next-patchlevel to Candidate for patchlevel
Actions #11

Updated by Benjamin Serfhos almost 5 years 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\'}')}"

Actions #12

Updated by Simon Köhler almost 5 years 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!

Actions #13

Updated by Guido Schmechel over 4 years ago

  • Related to Bug #88415: InvalidArgumentException in SiteConfiguration added
Actions #14

Updated by Guido Schmechel over 4 years ago

Patch added in the related issue.

Actions #15

Updated by Jan Greth over 4 years 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

Actions #16

Updated by Hugo Laporte over 4 years ago

I also confirm.

UNIX
PHP 7.3.10
TYPO3 9.5.11

On Access page : PHP Warning: Cannot use a scalar value as an array in /www/typo3_src-9.5.11/typo3/sysext/extbase/Classes/Mvc/Web/Routing/UriBuilder.php line 539

On Reports page : PHP Warning: array_merge(): Expected parameter 2 to be an array, string given in /www/typo3_src-9.5.11/typo3/sysext/backend/Classes/Routing/UriBuilder.php line 108

On BE Users page : The argument "arguments" was registered with type "array", but is of type "integer" in view helper "TYPO3\CMS\Fluid\ViewHelpers\Widget\UriViewHelper".

@Eugen Hollmann @Patrick Broens Broens Did you find a solution regarding System>Access and System>Reports ?

Actions #17

Updated by Jan Greth over 4 years ago

And again the behaviour occurs:

OS Debian Buster
PHP Version 7.3.11
TYPO3 CMS 9.5.11 via Composer (Installation: composer require typo3/cms-about:^9.5 typo3/cms-adminpanel:^9.5 typo3/cms-backend:^9.5 typo3/cms-belog:^9.5 typo3/cms-beuser:^9.5 typo3/cms-core:^9.5 typo3/cms-extbase:^9.5 typo3/cms-extensionmanager:^9.5 typo3/cms-feedit:^9.5 typo3/cms-felogin:^9.5 typo3/cms-filelist:^9.5 typo3/cms-filemetadata:^9.5 typo3/cms-fluid:^9.5 typo3/cms-fluid-styled-content:^9.5 typo3/cms-form:^9.5 typo3/cms-frontend:^9.5 typo3/cms-impexp:^9.5 typo3/cms-info:^9.5 typo3/cms-install:^9.5 typo3/cms-linkvalidator:^9.5 typo3/cms-lowlevel:^9.5 typo3/cms-opendocs:^9.5 typo3/cms-recordlist:^9.5 typo3/cms-recycler:^9.5 typo3/cms-redirects:^9.5 typo3/cms-reports:^9.5 typo3/cms-rsaauth:^9.5 typo3/cms-rte-ckeditor:^9.5 typo3/cms-scheduler:^9.5 typo3/cms-seo:^9.5 typo3/cms-setup:^9.5 typo3/cms-sys-action:^9.5 typo3/cms-sys-note:^9.5 typo3/cms-t3editor:^9.5 typo3/cms-taskcenter:^9.5 typo3/cms-tstemplate:^9.5 typo3/cms-viewpage:^9.5 )

Added to TYPO3 CMS the Introduction Package: composer require typo3/cms-introduction:4.0.1

Sites Module => No default Site, so i click "Add new site configuration for this site"

Result:

Oops, an error occurred!
The argument "parameters" was registered with type "array", but is of type "string" in view helper "TYPO3\CMS\Fluid\ViewHelpers\Be\UriViewHelper".
More information regarding this error might be available online.

Actions #18

Updated by Eugen Hollmann over 4 years ago

@Hugo Laporte I downgraded to PHP 7.2, as this bug only occures on PHP 7.3.

Actions #19

Updated by Hugo Laporte over 4 years ago

Eugen Hollmann wrote:

@Hugo Laporte I downgraded to PHP 7.2, as this bug only occures on PHP 7.3.

I have a copy of my installation on another server which also run with php 7.3 and I don't see the error on the second one. I tried to compare both php.ini but I don't see anything that can leads to this.

Actions #20

Updated by Farid Muradimov over 4 years ago

+1

Problem only in PHP 7.3. Latest version including.
In PHP 7.2 all works fine.

PHP.ini is same.

Maybe language is changed...

Actions #21

Updated by Gerrit Code Review over 4 years ago

  • Status changed from Needs Feedback to Under Review

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62450

Actions #22

Updated by Hugo Laporte over 4 years ago

Gerrit Code Review wrote:

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62450

WOW! Works like a charm! Thank you Patrick Broens!

Actions #23

Updated by Patrick Broens over 4 years ago

Hugo Laporte wrote:

Gerrit Code Review wrote:

Patch set 1 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62450

WOW! Works like a charm! Thank you Patrick Broens!

You're welcome.
If you have tested it, please add your vote, be it for code review or for testing so it can be merged soon.

Actions #24

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62500

Actions #25

Updated by Patrick Broens over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #26

Updated by Gerrit Code Review over 4 years ago

  • Status changed from Resolved to Under Review

Patch set 2 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62500

Actions #27

Updated by Gerrit Code Review over 4 years ago

Patch set 3 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62500

Actions #28

Updated by Gerrit Code Review over 4 years ago

Patch set 4 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62500

Actions #29

Updated by Gerrit Code Review over 4 years ago

Patch set 5 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/62500

Actions #30

Updated by Patrick Broens over 4 years ago

  • Status changed from Under Review to Resolved
Actions #31

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions #32

Updated by Benni Mack over 4 years ago

  • Related to Bug #87573: TYPO3 CMS Exception 1256475113 in Extension Manager added
Actions

Also available in: Atom PDF