Bug #73076
closedPublishing of changed sys_file_metadata fails because of missing config array for with and height fields
100%
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
Updated by Herbert Sojnik almost 9 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
Updated by Thomas Balko almost 9 years ago
We are experiencing the exact same error with TYPO3 Version 6.2.17.
Operating system: Unix
PHP version: 5.5.32
Updated by taywa gmbh over 8 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
Updated by taywa gmbh over 8 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?
Updated by Andreas Krämer over 8 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.
Updated by Sascha Schieferdecker over 8 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.
Updated by Benni Mack over 8 years ago
- Target version changed from 7.6.5 to Candidate for patchlevel
Updated by Christian Weiske over 8 years ago
Workaround for this bug is to enable filemetadata
extension.
Updated by Willi Martens over 8 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.
Updated by Robert Vock about 8 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/
Updated by Michael Gaier over 7 years ago
Updated by Gerrit Code Review almost 7 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
Updated by Benni Mack almost 7 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.
Updated by Benni Mack almost 7 years ago
- Related to Bug #83152: TCA migration should check that all TCA columns have a config section added
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Gerrit Code Review almost 7 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
Updated by Benni Mack almost 7 years ago
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Applied in changeset 46dbd8b756124d8c171ef379047c476d55221483.
Updated by Patrick Broens almost 7 years ago
- Related to Bug #83140: Images not shown when metadata is translated added
Updated by Frans Saris almost 7 years ago
- Related to Bug #83247: Translating sys_file_metadata results in width 0 and height 0 added