Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] PHP Warning: Undefined array key "multipleSource". #1298

Open
beatrycze-volk opened this issue Aug 14, 2024 · 3 comments
Open

[BUG] PHP Warning: Undefined array key "multipleSource". #1298

beatrycze-volk opened this issue Aug 14, 2024 · 3 comments
Assignees
Labels
🐛 bug A non-security related bug.

Comments

@beatrycze-volk
Copy link
Collaborator

Description

The usage of array in newly inserted code is throwing errors in PHP 8:

Wed, 14 Aug 2024 15:01:20 +0000 [CRITICAL] request="774b121ecf4f4" component="TYPO3.CMS.Core.Error.DebugExceptionHandler": Core: Exception handler (WEB: FE): TYPO3\CMS\Core\Error\Exception, code #1476107295, file /var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php, line 137: PHP Warning: Undefined array key "multipleSource" in /var/www/extensions/kitodo-presentation/Classes/Controller/AbstractController.php line 512- Exception: PHP Warning: Undefined array key "multipleSource" in /var/www/extensions/kitodo-presentation/Classes/Controller/AbstractController.php line 512, in file /var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php:137 - {"mode":"WEB","application_mode":"FE","exception_class":"TYPO3\\CMS\\Core\\Error\\Exception","exception_code":1476107295,"file":"/var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php","line":137,"message":"PHP Warning: Undefined array key \"multipleSource\" in /var/www/extensions/kitodo-presentation/Classes/Controller/AbstractController.php line 512","request_url":"https://sachsendigital.ddev.site/werkansicht?tx_dlf%5Bid%5D=https://digital.slub-dresden.de/data/kitodo/TheDarea_416971482-19060203/TheDarea_416971482-19060203_mets.xml","exception":"TYPO3\\CMS\\Core\\Error\\Exception: PHP Warning: Undefined array key \"multipleSource\" in /var/www/extensions/kitodo-presentation/Classes/Controller/AbstractController.php line 512 in /var/www/html/vendor/typo3/cms-core/Classes/Error/ErrorHandler.php:137\nStack trace:\n#0 /var/www/extensions/kitodo-presentation/Classes/Controller/AbstractController.php(512)

Reproduction

Steps to reproduce the behaviour:

  1. Install TYPO3 11.x with PHP 8.x
  2. Click on link to display document page e.g. https://sachsendigital.ddev.site/werkansicht?tx_dlf[id]=https://digital.slub-dresden.de/data/kitodo/TheDarea_416971482-19060203/TheDarea_416971482-19060203_mets.xml
  3. See error

Expected Behavior

This kind of errors should not happen as Kitodo.Presentation provides support up to PHP 8.3. The handling of nonexistent array keys should be made appropriately.

Screenshots and Examples

phperror

Environment

  • RDBMS version: MariaDB 10.3
  • TYPO3 version: 11.5.37
  • PHP version: 8.2
@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Aug 14, 2024
@sebastian-meyer
Copy link
Member

Tagging @chrizzor, because this was introduced with the MultiView feature in #1281.

@sebastian-meyer sebastian-meyer changed the title [BUG] Recent adjustments of musical source are not PHP 8 compatible [BUG] PHP Warning: Undefined array key "multipleSource". Aug 20, 2024
@csidirop
Copy link
Contributor

csidirop commented Sep 3, 2024

Not sure if this is the same error source but I'm getting a lot of similar Undefined array key warnings:

Tue, 03 Sep 2024 09:36:38 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "targetUid" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/TableOfContentsController.php line 134
Tue, 03 Sep 2024 09:36:38 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "targetUid" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/TableOfContentsController.php line 134
Tue, 03 Sep 2024 09:36:39 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "storagePid" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/AbstractController.php line 495
Tue, 03 Sep 2024 09:36:39 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "DOWNLOAD" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/ToolboxController.php line 330
Tue, 03 Sep 2024 09:36:39 +0000 [WARNING] request="aee72cc5a76fe" component="Kitodo.Dlf.Controller.ToolboxController": File not found in fileGrps "DOWNLOAD"
Tue, 03 Sep 2024 09:36:39 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "DOWNLOAD" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/ToolboxController.php line 374
Tue, 03 Sep 2024 09:36:40 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "useInternalProxy" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/PageViewController.php line 238
Tue, 03 Sep 2024 09:36:40 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "progressElementId" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/PageViewController.php line 146
Tue, 03 Sep 2024 09:36:40 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "useInternalProxy" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/PageViewController.php line 150
Tue, 03 Sep 2024 09:36:40 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "AUDIO" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/AudioPlayerController.php line 91
Tue, 03 Sep 2024 09:36:40 +0000 [WARNING] request="aee72cc5a76fe" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "pageStep" in /var/www/typo3/public/typo3conf/ext/dlf/Classes/Controller/NavigationController.php line 81

This is after (hard-)reloading a document page.

Environment:

  • DFG-Viewer v6.1.1
  • RDBMS version: MySQL 10.11.8-MariaDB-ubu2204
  • TYPO3 version: 11.5.39
  • PHP version: 8.2 (8.3.9)

@beatrycze-volk
Copy link
Collaborator Author

It is the same error which is visible for PHP 8.x. PHP 7.x is not displaying this warning.

The two fixes can be found here #1322 and here #1324.

The main cause for the problems is missing configuration from FlexForms. During the upgrade to TYPO3 11.x the FlexForms were also updated and since that time they are not read anymore. Some of the settings are read from TS config, but not all of them are configured there so those are missing.

Fixes mentioned above are helping by adding the default values but are not fixing the root cause.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug A non-security related bug.
Projects
None yet
Development

No branches or pull requests

4 participants