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] Get METS url with newest presentation version #968

Closed
csidirop opened this issue Jun 5, 2023 · 3 comments · Fixed by #988
Closed

[BUG] Get METS url with newest presentation version #968

csidirop opened this issue Jun 5, 2023 · 3 comments · Fixed by #988
Labels
🐛 bug A non-security related bug.

Comments

@csidirop
Copy link
Contributor

csidirop commented Jun 5, 2023

Description

With presentation 3.3 there was a variable called $uid stored in a Document object. It holds the UID (solr indexed) or the URL (mets) of the document.
Now with presentation 4.x the mentioned variable is empty for all METS files I've tested (around 30) or any solr indexed documents.

Is this on purpose or a bug? If on purpose, what would be the correct way to get the url?

Reproduction

Try any METS files and check if $doc->uid (for PageView) or $this->document->getDoc() (PageViewController) is empty or not.
Example: https://digital.slub-dresden.de/oai/?verb=GetRecord&metadataPrefix=mets&identifier=oai:de:slub-dresden:db:id-512520879
But you can try any of those too: https://github.com/UB-Mannheim/kitodo-presentation/wiki/METS-Examples

Environment

  • OS version: Debian
  • RDBMS version: Maria DB
  • Apache Solr version: -
  • TYPO3 version: 10.4.37
  • PHP version: 7.4.33
@csidirop
Copy link
Contributor Author

csidirop commented Jun 5, 2023

Btw.: I went back till 6074cdf from Mar. 2022 and the variable (and some more) is still empty. So maybe its since the Extbase/Fluid transition.

@csidirop
Copy link
Contributor Author

csidirop commented Jun 7, 2023

As I have suspected, this issue appears after the Extbase/fluid transition ce36746 .

I digged a bit deeper. Prior to v4.x the construct function of Document set the $uid var up. With v4.x the code moved to individual functions (one of those init($location)).
Furthermore the $location parameter of the construct function in Doc was in every test empty.

Then I realized that somehow I missed, that there is no $uid var any more in v.4.x even though a var_dump of the document object has it (even if its null) and its still referenced in the code (btw. adding type declarations would stop at those points).

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Jul 20, 2023
@sebastian-meyer sebastian-meyer changed the title [Question] Get METS url with newest presentation version [BUG] Get METS url with newest presentation version Jul 20, 2023
@sebastian-meyer sebastian-meyer linked a pull request Jul 21, 2023 that will close this issue
@sebastian-meyer
Copy link
Member

Closed this, because while it is true, that uid and location are no longer properties of Doc class, this is an intentional change. Those properties were moved to DocumentRepository and can be accessed there.

csidirop added a commit to UB-Mannheim/kitodo-presentation that referenced this issue Jul 24, 2023
 - $uid and $location were moced to the new Document class
 - see kitodo#968

Signed-off-by: Christos Sidiropoulos <[email protected]>
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

Successfully merging a pull request may close this issue.

2 participants