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

Metadata: null when retrieving series DOI link #2594

Open
iannesbitt opened this issue Dec 30, 2024 · 2 comments
Open

Metadata: null when retrieving series DOI link #2594

iannesbitt opened this issue Dec 30, 2024 · 2 comments

Comments

@iannesbitt
Copy link
Contributor

Describe the bug
When retrieving a series DOI (for example: doi:10.24431/rw1k8fz), the metadata document returns as Metadata: null. Viewing the same dataset with the exact DOI version link directly does not show this issue (for example: doi:10.24431_rw1k8fz_20241021T144253Z.

Using the Inspector to disable using cached data seems to solve this issue, and everything loads just fine.

To Reproduce
Steps to reproduce the behavior:

  1. Go to doi:10.24431/rw1k8fz
  2. Scroll down to Files and Folders
  3. See Metadata: null error
  4. If no error appears, refresh and return to step 3.
  5. Open Inspector and check Disable Cache
    Screen Shot 2024-12-30 at 15 09 43
  6. Refresh page
  7. Metadata document should populate ok

Expected behavior
Metadata document should load at all times

Screenshots
If applicable, add screenshots to help explain your problem.
Screen Shot 2024-12-30 at 11 18 23
Screen Shot 2024-12-30 at 11 19 05

Desktop (please complete the following information):

  • OS: Mac OS
  • Browser: Firefox
  • Version: 133.0
@iannesbitt iannesbitt added the bug label Dec 30, 2024
@iannesbitt
Copy link
Contributor Author

This was reported in Slack: https://dataoneorg.slack.com/archives/C2ASPD868/p1735581601890769

@mbjones
Copy link
Member

mbjones commented Dec 31, 2024

This is consistent across multiple browsers and versions for me (FF, Brave, Safari).

I spent a few minutes in the javascript debugger with this, and found out a few interesting tidbits.

  • The fileName attribute in the model is indeed null after exiting the block on line 245 of DataItemView.js
  • Backtracing this to where that data comes from, I went all the way back to where the data package is loaded on line 216 of MetadataView.js
    • 216 const dataOneObject = new ScienceMetadata({ id: this.model.get("id") });

When I set a breakpoint on line 216 and execute that line, I see that fileName is null:

  • dataOneObject.attributes.fileName: null

Interestingly, after setting that breakpoint and inspecting the property, if I then hit "Continue" in the debugger, then the property gets filled in and displays the title in the UI without a problem. But, if I don't stop in the debugger, then the Metadata: null shows up in the UI. So, there seems to be a timing issue where the values are not populated yet at render time, but delaying a second or so allows them to get filled in. As @iannesbitt said, it only seems to happen when the Cache is not disabled. Here's a quick video showing the effect:

metadata-null-2024-12-30.mp4

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Development

No branches or pull requests

3 participants