Project

General

Profile

Actions

Bug #88365

closed

<style> element in fluid templates breaks output since PHP 7.3.5

Added by Patrick Lenk almost 5 years ago. Updated about 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Fluid
Target version:
-
Start date:
2019-05-15
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
8
PHP Version:
7.3
Tags:
php73
Complexity:
Is Regression:
Sprint Focus:

Description

With PHP 7.3.5 the frontend and mail output is broken and a php warning in the backend log is shown, if the <style> element is used in fluid templates or layouts.

I use the <style> element in some plugin fluid templates (ext:powermail), with PHP 7.3.5 the frontend output is broken.

I also use the <style> element in some plugin fluid layouts for mails (ext:powermail), with PHP 7.3.5 the mail output is broken. After each form submit, the following two warnings are shown in the backend log:

Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach() in /<REMOVED>/vendor/typo3fluid/fluid/src/Core/Parser/TemplateParser.php line 591

Core: Error handler (FE): PHP Warning: Invalid argument supplied for foreach() in /<REMOVED>/vendor/typo3fluid/fluid/src/Core/Parser/TemplateProcessor/NamespaceDetectionTemplateProcessor.php line 180

Temporary fix: Moving styles from the <style> element in the fluid templates to a external file and remove the <style> rules to (only) inline styles in the fluid mail layouts.

I don't think this is a issue of ext:powermail, because this issue: https://github.com/TYPO3/Fluid/issues/452

Actions #1

Updated by Thomas Hohn almost 5 years ago

Patrick no-lastname-given wrote:

Since the security release 8.7.25 the frontend and mail output is broken and a php warning in the backend log is shown, if the <style> element is used in fluid templates or layouts.

I use the <style> element in some plugin fluid templates (ext:powermail), since 8.7.25 the frontend output is broken.

I also use the <style> element in some plugin fluid layouts for mails (ext:powermail), since 8.7.25 the mail output is broken. After each form submit, the following two warnings are shown in the backend log:
[...]

It apears only on remote linux server, not on local windows test machine!

Temporary fix: Moving styles from the <style> element in the fluid templates to a external file and remove the <style> rules to (only) inline styles in the fluid mail layouts.

I don't think this is a issue of ext:powermail, because this issue: https://github.com/TYPO3/Fluid/issues/452

Just out of curiosity - which exact PHP version are you using? Is it PHP 7.3.5/7.3.4 - if so it seems to be a change in the reg exp processing between PHP 7.3.3 and PHP 7.3.5
that causes this bug to arise now.

Actions #2

Updated by Patrick Lenk almost 5 years ago

7.3.5 yes

Actions #3

Updated by Thomas Hohn almost 5 years ago

Patrick no-lastname-given wrote:

7.3.5 yes

It's a race condition caused by 7.3.5 changes in preg_split. I have 8.7.25 running with 7.3.3 - upgrading to 7.3.5 made a couple of FLUID template raise that error.

Actions #4

Updated by Oliver Hader almost 5 years ago

  • Tags set to php73
Actions #5

Updated by Patrick Lenk almost 5 years ago

  • Subject changed from <style> element in fluid templates breaks output since 8.7.25 to <style> element in fluid templates breaks output since PHP 7.3.5
Actions #6

Updated by Patrick Lenk almost 5 years ago

  • Description updated (diff)
Actions #7

Updated by Patrick Lenk almost 5 years ago

  • Description updated (diff)
Actions #8

Updated by Benni Mack almost 5 years ago

Can anybody confirm that PHP 7.3.4 still works?

This seems to be the change related:
https://bugs.php.net/bug.php?id=77827
https://www.php.net/ChangeLog-7.php#7.3.5

Actions #9

Updated by Rasmus Larsen almost 5 years ago

I can confirm that the following build doesn't trigger the issue for us:

PHP 7.3.4-1+ubuntu18.04.1+deb.sury.org+3 (cli) (built: Apr 10 2019 10:51:11) ( NTS )

Upgrading to PHP 7.3.5 triggers the issue for us.

Actions #10

Updated by Benni Mack over 4 years ago

  • Status changed from New to Needs Feedback

Does the issue still exist in TYPO3 v9.5.13?

Actions #11

Updated by Patrick Lenk over 4 years ago

Benni Mack wrote:

Does the issue still exist in TYPO3 v9.5.13?

With TYPO3 9.5.13 i can not reproduce that error messages or a broken frontend.
The only thing that still broke the output are mail layouts that contains @media rules in the style tag.

Actions #12

Updated by Benni Mack about 4 years ago

  • Status changed from Needs Feedback to Closed

Closing this one - no feedback after 90 days. If you feel this is still an issue, leave a comment so I can re-open the issue.

Actions

Also available in: Atom PDF