Bug #73076

Publishing of changed sys_file_metadata fails because of missing config array for with and height fields

Added by Andreas Krämer over 5 years ago. Updated almost 3 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Workspaces
Start date:
2016-02-02
Due date:
% Done:

100%

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

Description

Hello, I get the following error trying to publish changed metadata from any file:
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/sysext/version/Classes/Hook/DataHandlerHook.php on line 905 and defined in /typo3/sysext/version/Classes/Hook/DataHandlerHook.php line 1048

I looked up the code and for all TCA-fields a config array is expected:
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/version/Classes/Hook/DataHandlerHook.php#L907

But there is no config for width and height in sys_file_metadata (without installing the filemetadata plugin):
https://github.com/TYPO3/TYPO3.CMS/blob/master/typo3/sysext/core/Configuration/TCA/sys_file_metadata.php#L126

I think the issue at least exists since version 6.2

Steps to reproduce:
  • Change metadata of arbitrary file with a simple editor on draft workspace, e.g. the title
  • Go to the workspace module and send the changes to the next stage "ready to publish"
  • With an admin, go to the workspace module and try to publish these changes

Related issues

Related to TYPO3 Core - Bug #83152: TCA migration should check that all TCA columns have a config sectionClosedBenni Mack2017-11-29

Actions
Related to TYPO3 Core - Bug #83140: Images not shown when metadata is translatedClosed2017-11-28

Actions
Related to TYPO3 Core - Bug #83247: Translating sys_file_metadata results in width 0 and height 0Rejected2017-12-07

Actions
Has duplicate TYPO3 Core - Bug #77619: Catchable Fatal Error during publishing processClosed2016-08-24

Actions
#1

Updated by Herbert Sojnik over 5 years ago

As far as I can see, the problem was introduced between 6.2.15 and 6.2.17.
In our installation the problem did not occur with 6.2.14

#2

Updated by Thomas Balko over 5 years ago

We are experiencing the exact same error with TYPO3 Version 6.2.17.

Operating system: Unix
PHP version: 5.5.32

#3

Updated by taywa gmbh over 5 years ago

  • Target version set to 7.6.5

Same here, TYPO3 7 LTS (7.6.4). PHP 5.5.9-1ubuntu4.14

router
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 /var/www/TYPO3_7_LTS.CMS.git/typo3/sysext/version/Classes/Hook/DataHandlerHook.php on line 907 and defined in /var/www/TYPO3_7_LTS.CMS.git/typo3/sysext/version/Classes/Hook/DataHandlerHook.php line 1050

I get this Error in log: [newlog()] A swapping lock file was present. Either another swap process is already running or a previous swap process failed. Ask your administrator to handle the situation.

Deleting the swap_locking folder in typo3temp is not resolving this

#4

Updated by taywa gmbh over 5 years ago

After seeing this error:

 caller => "TYPO3\CMS\Core\Database\DatabaseConnection::exec_SELECTquery" (60 chars)
   ERROR => "Unknown column 'uid' in 'field list'" (36 chars)
   lastBuiltQuery => "SELECT uid FROM tx_realurl_pathcache WHERE 1=1" (46 chars)
   debug_backtrace => "call_user_func#27 // {closure}# // TYPO3\CMS\Backend\Console\Application->ru
      n#26 // TYPO3\CMS\Core\Core\Bootstrap->handleRequest#73 // TYPO3\CMS\Backend
      \Console\CliRequestHandler->handleRequest#302 // call_user_func#69 // TYPO3\
      CMS\Core\Cache\Backend\SimpleFileBackend->{closure}# // TYPO3\CMS\Core\Datab
      ase\ReferenceIndex->updateIndex#1088 // TYPO3\CMS\Core\Database\DatabaseConn
      ection->exec_SELECTquery#1182 // TYPO3\CMS\Core\Database\DatabaseConnection-
      >debug#314" (466 chars)

I deinstalled and reinstalled realurl and updated refindex, now it works.

I had this problem on a updated Page 4.5 -> 6.2 -> 7 LTS . OP, Can you try this too?

#5

Updated by Andreas Krämer over 5 years ago

Thanks for your update and sorry it took me so long to respond!
I just tested it with a clean installation of TYPO3 7.6.5. I configured a draft workspace and did the mentioned "steps to reproduce". The error immediately occured after trying to publish the changed title of my image. realUrl was not installed this time.
If I take a look into the code this can not work with the default TCA configuration of width and height in sys_file_metadata.

#6

Updated by Sascha Schieferdecker over 5 years ago

I can confirm the issue exists in 7.6.9. Rebuild reference index doesn't help, only the installation of filemetadata solves the problem.

#7

Updated by Benni Mack about 5 years ago

  • Target version changed from 7.6.5 to Candidate for patchlevel
#8

Updated by Christian Weiske about 5 years ago

Workaround for this bug is to enable filemetadata extension.

#9

Updated by Willi Martens about 5 years ago

Same problem in 6.2.25 and 6.2.26.

PHP-Log (only with 6.2.25):

PHP Catchable fatal error:  Argument 3 passed to TYPO3\CMS\Version\Hook\DataHandlerHook::version_swap_processFields() must be an array, null given, called in /var/lib/typo3/typo3_src-6.2.25/typo3/sysext/version/Classes/Hook/DataHandlerHook.php on line 864 and defined in /var/lib/typo3/typo3_src-6.2.25/typo3/sysext/version/Classes/Hook/DataHandlerHook.php on line 1030

BE-Protocol:

[newlog()] A swapping lock file was present. Either another swap process is already running or a previous swap process failed. Ask your administrator to handle the situation.

Enable filemetadata extension does not resolve the problem for me.

#10

Updated by Robert Vock about 5 years ago

I've just found, that I've reported a duplicate of this bug (#77619). I have commited a patch for the other bug:
https://review.typo3.org/#/c/49614/

#11

Updated by Michael Gaier about 4 years ago

Why does it take so long to decide on the way to go.

Either 'config' is mandatory in the TCA column definition or it is optional.

1) Mandatory use #81811
2) Optional use suggestion #77619

#12

Updated by Gerrit Code Review almost 4 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/54848

#13

Updated by Benni Mack almost 4 years ago

Hey Michael,

I was not aware of that issue until last night. I have pushed a patch adding the fields for v9, v8 and v7. Please review and test.

For v9, I will add a deprecation that it is not possible to add TCA columns without a config.

#14

Updated by Benni Mack almost 4 years ago

  • Related to Bug #83152: TCA migration should check that all TCA columns have a config section added
#15

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/54848

#16

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/54848

#17

Updated by Gerrit Code Review almost 4 years ago

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

#18

Updated by Gerrit Code Review almost 4 years ago

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

#19

Updated by Gerrit Code Review almost 4 years ago

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

#20

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/54863

#21

Updated by Benni Mack almost 4 years ago

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

Updated by Patrick Broens almost 4 years ago

  • Related to Bug #83140: Images not shown when metadata is translated added
#23

Updated by Frans Saris almost 4 years ago

  • Related to Bug #83247: Translating sys_file_metadata results in width 0 and height 0 added
#24

Updated by Benni Mack almost 3 years ago

  • Status changed from Resolved to Closed

Also available in: Atom PDF