Project

General

Profile

Actions

Bug #84698

closed

Severity for ext:form was not accepted

Added by Stefan Froemken over 6 years ago. Updated over 6 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Form Framework
Target version:
-
Start date:
2018-04-12
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.1
Tags:
Complexity:
easy
Is Regression:
Sprint Focus:

Description

Hello Core-Team,

I have following yaml configuration for EXT:form:

...
finishers:
  -
    options:
      messageTitle: 'Argh'
      messageBody: 'I am sitting in the %s'
      messageArguments:
        - foo: 'bar'
      severity: -1
    identifier: FlashMessage
...

This will result in following error message:

Argument 1 passed to TYPO3\CMS\Core\Messaging\AbstractMessage::setSeverity() must be of the type integer, string given, called in /Users/stefan/htdocs/typo3_src/typo3/sysext/core/Classes/Messaging/FlashMessage.php on line 42

I have defined that value as int and it is still int while calling FlashMessageFinisher, but there is no early return for options of type int, so severity lands in your preg_replace_callback(whatever) and will be returned as string, which, of cause, is not valid.

Stefan


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #83477: Form finisher parseOption fails with MultiCheckbox / MultiSelectClosedRonald Kools2018-01-04

Actions
Actions #1

Updated by Gerrit Code Review over 6 years ago

  • Status changed from New 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/56636

Actions #2

Updated by Stefan Froemken over 6 years ago

This patch only solves the cast problem. FlashMessageFinisher has another bug in general. I will create another issue for that

Actions #3

Updated by Ralf Zimmermann over 6 years ago

  • Status changed from Under Review to Needs Feedback
  • Assignee set to Stefan Froemken

Can you test if https://review.typo3.org/c/55820/ solves your problem? If yes, i prefer to abandoned this in favor of review:55820

Actions #4

Updated by Oliver Hader over 6 years ago

  • Related to Bug #83477: Form finisher parseOption fails with MultiCheckbox / MultiSelect added
Actions #5

Updated by Riccardo De Contardi over 6 years ago

  • Status changed from Needs Feedback to Closed
  • Assignee deleted (Stefan Froemken)
  • Target version deleted (8.7.13)

I close this one; https://review.typo3.org/#/c/55820/ has been already merged and the issue should be fixed.

If you think that this is the wrong decision or experience the issue again, please reopen it or open a new issue with a reference to this one.

Thank you and best regards

Actions

Also available in: Atom PDF