Unable to download PDFs
Expected behaviour
When clicking the Download button and then selecting PDF, the used should be redirected to a PDF file.
Current behaviour
A pop up saying "something went wrong"
Steps to reproduce
- Create a manuscript
- Complete the needed fields
- Do not add an publish date.
- Submit the manuscript
- Click production
- Try to download a PDF
- it will fail
Environment
Possible solution
From the container logs it looks like the datePublish is needed in order to generate the PDF.
Error: Unable to call `article["submission"]["datePublished"]["split"]`, which is undefined or falsey name=Template render error
info: ::ffff:172.18.0.1 - - [26/Jan/2024:08:52:38 +0000] "POST /graphql HTTP/1.1" 200 134 "https://kotahi.url/kotahi/versions/manuscript/production" "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:121.0) Gecko/20100101 Firefox/121.0"