Bug #77619

Catchable Fatal Error during publishing process

Added by Robert Vock about 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Target version:
-
Start date:
2016-08-24
Due date:
% Done:

100%

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

Description

When I try to publish a complete workspace, I got the following error:

PHP Catchable Fatal Error: Argument 3 passed to TYPO3\CMS\Version\Hook\DataHandlerHook::version_swap_processFields() must be of the type array, null given,
called in .../typo3_src/typo3/sysext/version/Classes/Hook/DataHandlerHook.php on line 907 and defined in .../typo3_src/typo3/sysext/version/Classes/Hook/DataHandlerHook.php line 1050

This happens because the method TYPO3\CMS\Version\Hook\DataHandlerHook::version_swap_processFields gets called with null instead of an array, if a field in TCA does not have a config-entry.

The core-configuration for sys_file_metadata contains a configuration for width, which does not contain a config-entry.

Relevant code positions:
https://github.com/TYPO3/TYPO3.CMS/blob/e5c510f1069b751053e0056b52ff3a93397ba91f/typo3/sysext/version/Classes/Hook/DataHandlerHook.php#L945
https://github.com/TYPO3/TYPO3.CMS/blob/e5c510f1069b751053e0056b52ff3a93397ba91f/typo3/sysext/core/Configuration/TCA/sys_file_metadata.php#L121

The fix would be to check if $fieldConf['config'] exists and is an array in the version_swap-method before calling the version_swap_processFields-method.


Related issues

Is duplicate of TYPO3 Core - Bug #73076: Publishing of changed sys_file_metadata fails because of missing config array for with and height fieldsClosed2016-02-02

Actions
#1

Updated by Gerrit Code Review about 5 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/49614

#2

Updated by Gerrit Code Review almost 4 years ago

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

#3

Updated by Gerrit Code Review almost 4 years ago

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

#4

Updated by Gerrit Code Review almost 4 years ago

Patch set 1 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54854

#5

Updated by Gerrit Code Review almost 4 years ago

Patch set 2 for branch TYPO3_8-7 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54854

#6

Updated by Gerrit Code Review almost 4 years ago

Patch set 1 for branch TYPO3_7-6 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/54855

#7

Updated by Benni Mack almost 4 years ago

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

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF