Books with automatic publishing, crash the site if there are loading errors
NCBI has the option to allow automatic publishing, without approval from admin or editor. Which means if the conversion is successful the book goes automatically from Previewing to Publishing.
Expected behavior
For book settings where the 'Require approval before publishing' toggle is turned off. This setting can be turned off for XML Wholebooks, PDF Wholebooks and Word Complete Doc.
If the conversion is successful book goes from Loading preview -> Previewing -> Publishing
If the conversion is not successful it should go Loading preview -> Loading errors
Current behavior
When Clicked 'Reload preview' on a PDF wholebook (or XML Wholebook or Word Complete Book) which has errors, when the process for loading preview is finished the site crashes. When the app is restarted the status of the book is updated to 'Loading errors'.
Steps to reproduce
Example book where site will crash if clicked reload preview button: https://ncbidev.cloud68.co/organizations/e56a6d10-ed49-4a0d-aafa-fb9ecee8b0e3/bookmanager/eca869a0-f35a-49e4-8350-fb4ce7647985
- Create a PDF Wholebook (or XML, Word One Doc case as the bug is the same)
- On the second step turn off the toggle for 'Require approval before publishing', If you forget here, you can still change it at the settings tab of the book.
- Upload the converted file as in the example book above
- Click reload preview
- What for the loading to finish and in about 10 minutes the site will crash.
Environment
All browsers on ncbidev staging site.
Possible solution
QA Steps
[To be completed by Coko once dev is done]
Scheduling
-
This issue is blocking current user testing -
This issue is blocking current migration testing -
Fixing this issue is required for Priority 1: Deploy MVP -
This issue should be triaged into later epics in the PM weekly meeting