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

Unable to access the Project Overview/Update plan page when PDF is missing from plan #641

Open
jupiter007 opened this issue Aug 6, 2024 · 1 comment

Comments

@jupiter007
Copy link
Collaborator

Describe the bug
Problem 1: When a user clicks the "Project name & PDF upload" link from the Plan Overview page, the following Type Error is thrown, "TypeError: Cannot read properties of undefined (reading 'identifier')", due to a missing PDF and the user is not able to progress. We should be adding a null check for "pdf" before trying to using "pdf.identifier".

The error appears to occur in the "get narrative ()" section of models.js on the line "pdf.file_name = pdf.identifier.split('/').pop();".

To Reproduce
Steps to reproduce the behavior:

  1. Upload plan and select a plan that does not include a PDF
  2. Click on "Project name & PDF upload"
  3. Notice the error, as described above

Expected behavior
User should see a form where they can enter the Project name and upload a DMP PDF

Screenshots
image

@bofstein
Copy link
Collaborator

bofstein commented Aug 7, 2024

May happen only if a project has related works, like this one: https://dmptool-stg.cdlib.org/dashboard/dmp/doi.org_10.48321_D1912B40EA/pdf

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

No branches or pull requests

2 participants