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] Runtime warnings from dlf extension #1366

Open
stweil opened this issue Oct 23, 2024 · 8 comments
Open

[BUG] Runtime warnings from dlf extension #1366

stweil opened this issue Oct 23, 2024 · 8 comments
Assignees
Labels
🐛 bug A non-security related bug.

Comments

@stweil
Copy link
Member

stweil commented Oct 23, 2024

Description

This is a collection of warnings which are reported in a composer test installation of TYPO3 11 with dfgviewer (master + PR for TYPO3 12), dlf (e1b180c) and slub_digitalcollections on Debian stable.

Most warnings are related to the handling of a METS document.

Reproduction

Steps to reproduce the behaviour:

  1. Install with the components listed above.
  2. Load some example (in this case from SLUB) in installed DFG viewer.
  3. See errors in var/log/typo3_*.log

Expected Behavior

No warnings.

Screenshots and Examples

[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Trying to access array offset on value of type null in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "context" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "creationDate" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "issue" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "multipleSource" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Controller/AbstractController.php line 584 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "parentAuthor" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "parentPlace" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "parentYear" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "vd16" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key "vd17" in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 
[WARNING] request="7f4067d0520b7" component="TYPO3.CMS.Core.Error.ErrorHandler": Core: Error handler (FE): PHP Warning: Undefined array key 0 in /var/www/typo3_11/public/typo3conf/ext/dlf/Classes/Common/MetsDocument.php line 848 

Environment

  • OS version: Debian GNU Linux bookworm
  • TYPO3 version: 11

Additional Context

The test was run in Podman Desktop.

@stweil
Copy link
Member Author

stweil commented Oct 23, 2024

Related commit for Classes/Common/MetsDocument.php: d7d6ce6.

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Oct 23, 2024
@sebastian-meyer sebastian-meyer changed the title Runtime warnings from dlf extension [BUG] Runtime warnings from dlf extension Oct 23, 2024
@sebastian-meyer
Copy link
Member

Like many other bugs this was introduced with the somewhat rushed PR #1281. I assigned all those bugs to you, @chrizzor. Please have a look at them!

@markusweigelt
Copy link
Contributor

markusweigelt commented Oct 24, 2024

@stweil Problem is already fixed.

$currentMetadata = $metadata[$indexName][0];

Please update your dlf extension to the state of the current master branch.

@stweil
Copy link
Member Author

stweil commented Oct 24, 2024

With the very latest code from git master, I get these warnings:

Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "originalIiifMetadata" not set, using default value "0". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "displayIiifDescription" not set, using default value "1". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "displayIiifRights" not set, using default value "1". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "displayIiifLinks" not set, using default value "1". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "originalIiifMetadata" not set, using default value "0". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "displayIiifDescription" not set, using default value "1". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "displayIiifRights" not set, using default value "1". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:36 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "displayIiifLinks" not set, using default value "1". Probably FlexForm for controller "Kitodo\Dlf\Controller\MetadataController" is not read. 
Thu, 24 Oct 2024 10:03:48 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "storagePid" not set, using default value "0". Probably FlexForm for controller "Slub\Dfgviewer\Controller\UriController" is not read. 
Thu, 24 Oct 2024 10:03:48 +0000 [WARNING] request="6c632fd76bfe6" component="Kitodo.Dlf.Controller.AbstractController": Setting "storagePid" not set, using default value "0". Probably FlexForm for controller "Slub\Dfgviewer\Controller\UriController" is not read. 

@stweil
Copy link
Member Author

stweil commented Oct 24, 2024

I now updated dfgviewer, too, to the latest git master. This breaks my test URL (http://localhost:8080/viewer?tx_dlf[id]=https%3A%2F%2Fdigital.slub-dresden.de%2Foai%2F%3Fverb%3DGetRecord%26metadataPrefix%3Dmets%26identifier%3Doai%3Ade%3Aslub-dresden%3Adb%3Aid-263566811). It now only shows the same page as http://localhost:8080/viewer.

The logfile shows these warnings every few minutes:

Thu, 24 Oct 2024 11:14:29 +0000 [ERROR] request="f89dfa5ed00a0" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Expression could not be parsed. - {"expression":"getTSFE()?.id == 1"}
Thu, 24 Oct 2024 11:14:29 +0000 [ERROR] request="f89dfa5ed00a0" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Expression could not be parsed. - {"expression":"getTSFE()?.id == 2"}

@markusweigelt
Copy link
Contributor

markusweigelt commented Oct 24, 2024

I now updated dfgviewer, too, to the latest git master. This breaks my test URL (http://localhost:8080/viewer?tx_dlf[id]=https%3A%2F%2Fdigital.slub-dresden.de%2Foai%2F%3Fverb%3DGetRecord%26metadataPrefix%3Dmets%26identifier%3Doai%3Ade%3Aslub-dresden%3Adb%3Aid-263566811). It now only shows the same page as http://localhost:8080/viewer.

The logfile shows these warnings every few minutes:

Thu, 24 Oct 2024 11:14:29 +0000 [ERROR] request="f89dfa5ed00a0" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Expression could not be parsed. - {"expression":"getTSFE()?.id == 1"}
Thu, 24 Oct 2024 11:14:29 +0000 [ERROR] request="f89dfa5ed00a0" component="TYPO3.CMS.Frontend.Configuration.TypoScript.ConditionMatching.ConditionMatcher": Expression could not be parsed. - {"expression":"getTSFE()?.id == 2"}

Seams to be a DFG-Viewer problem with slub/dfg-viewer#322 cause this expression getTSFE()?.id is not used in master and in Kitodo.Presentation.

@markusweigelt
Copy link
Contributor

@stweil I initially tested the update only in TYPO3 version 12. I have now set up a development environment with TYPO3 version 11 in parallel. I was able to resolve the issue with the incorrect test URL. The branch https://github.com/markusweigelt/kitodo-presentation/tree/fixed-typo3-12 will be submitted as a PR next week.

@stweil
Copy link
Member Author

stweil commented Oct 25, 2024

Thanks for all your work on TYPO3 12.

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