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] Metadata index_name still gets changed when moving metadata in list #1182

Closed
csidirop opened this issue Mar 5, 2024 · 2 comments · Fixed by #1186
Closed

[BUG] Metadata index_name still gets changed when moving metadata in list #1182

csidirop opened this issue Mar 5, 2024 · 2 comments · Fixed by #1186
Labels
🐛 bug A non-security related bug.

Comments

@csidirop
Copy link
Contributor

csidirop commented Mar 5, 2024

Description

After #1147 has been resolved, it looked like everything worked. To recap: changing a metadata entry and saving it worked! But moving a metadata entry up or down in the list triggers again a renaming of the index_name:

4: The value of the field "index_name" has been changed from "type" to "type0" as it is required to be unique.

To be honest, I think we could ignore this because everything works as aspected as far as I saw it. But users could be irritated by that.

@sebastian-meyer sebastian-meyer added the 🐛 bug A non-security related bug. label Mar 6, 2024
@sebastian-meyer sebastian-meyer changed the title Metadata index_name still gets changed when moving metadata in list [BUG] Metadata index_name still gets changed when moving metadata in list Mar 6, 2024
@csidirop
Copy link
Contributor Author

csidirop commented Mar 6, 2024

In addition: We could "fix" this by modifying the index_name of the translation. e.g: $translatedRecord->setIndexName($indexName."_".$siteLanguage->getLanguageId()); (here)

But I do not know if this is a good solution or just a workaround. If you think this thats ok, I can prepare a PR.

@csidirop
Copy link
Contributor Author

csidirop commented Mar 6, 2024

Btw. Solving this fixes also following issues:

  • Incorrectly assigned Data Format entries (e.g.: two MODS entries with false paths or entries not in MetadataDefaults.php) (first mentioned in [BUG] Metadata and structure translation entries #1147)
  • Calendar overview stopped working / showed nothing (getIssuesFromDocuments() called $document->getYear() but year was false indexed (volume instead of year) and thues there could no calendar get build)
  • Metadata is not translated when you change the language (in PageView)

All those issues are fixed by my proposal. So I'll open a PR and be open for feedback or changes.

Edit: Some of those errors coming from a faulty DFG-Viewer setup slub/dfg-viewer#283

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