Cannot replace Galley File (3.0.2)

When I open the dialog to replace a galley file, the prompts for the new file are entirely missing.

The console debugger replies with:
Uncaught SyntaxError: Unexpected token < in JSON at position 0
at JSON.parse ()
at Function.n.parseJSON (jquery.min.js:4)
at a.pkp.controllers.TabHandler.dataFilter (/js/pkp.min.js:180)
at Object.dataFilter (/js/pkp.min.js:92)
at Qc (jquery.min.js:4)
at x (jquery.min.js:4)
at XMLHttpRequest.b (jquery.min.js:4)

My Apache error log contains:
ojs2: Invalid revised file id!, referer: [ojs root]/workflow/index/[id]/4

Hi @Steve_Michaels,

Have you checked your PHP error log for details?

Regards,
Alec Smecher
Public Knowledge Project Team

The php error log is empty (I did change the logging level to catch
everything and it’s still not logging anything).

Steve Michaels
Emerging Technologies Librarian

ph 616.392.8555 x187
101 East 13th Street, Holland MI 49423-3622
[image: WTS_logo_email.png]

Hi @Steve_Michaels,

Could you use a developer tool like Firebug for Firefox to inspect the response that OJS generates when you try to open that dialog?

Regards,
Alec Smecher
Public Knowledge Project Team

GET
https://repository.westernsem.edu/pkp/index.php/rr/$$$call$$$/wizard/file-upload/file-upload-wizard/start-wizard?fileStage=10&reviewRoundId=&assocType=521&assocId=1055&revisedFileId=1972&revisionOnly=1&submissionId=969&stageId=5&uploaderRoles=16-17-4097&uploaderGroupIds=&_=1492022904697
https://repository.westernsem.edu/pkp/index.php/rr/$$$call$$$/wizard/file-upload/file-upload-wizard/start-wizard?fileStage=10&reviewRoundId=&assocType=521&assocId=1055&revisedFileId=1972&revisionOnly=1&submissionId=969&stageId=5&uploaderRoles=16-17-4097&uploaderGroupIds=&_=1492022904697

Response:

{“status”:true,“content”:"\n<script type=“text/javascript”>\n\t//
Attach the JS file upload wizard handler.\n\t$(function()
{\n\t\t$(’#fileUploadWizard’).pkpHandler(\n\t\t\t’$.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler’,\n\t\t\t{\n\t\t\t\tcancelButtonText:
“Cancel”,\n\t\t\t\tcontinueButtonText:
“Continue”,\n\t\t\t\tfinishButtonText:
“Complete”,\n\t\t\t\tdeleteUrl:
“https:\/\/repository.westernsem.edu\/pkp\/index.php\/rr\/$$$call$$$\/api\/file\/manage-file-api\/delete-file?submissionId=969&stageId=5&fileStage=10&suppressNotification=1”,\n\t\t\t\tmetadataUrl:
“https:\/\/repository.westernsem.edu\/pkp\/index.php\/rr\/$$$call$$$\/wizard\/file-upload\/file-upload-wizard\/edit-metadata?submissionId=969&stageId=5&reviewRoundId=&fileStage=10”,\n\t\t\t\tfinishUrl:
“https:\/\/repository.westernsem.edu\/pkp\/index.php\/rr\/$$$call$$$\/wizard\/file-upload\/file-upload-wizard\/finish-file-submission?submissionId=969&stageId=5&reviewRoundId=&fileStage=10”\n\t\t\t}\n\t\t);\n\t});\n</script>\n\n<div
id=“fileUploadWizard”>\n\t

Hi @Steve_Michaels,

Your post got garbled – can you try using the “preformatted text” tool when writing your post? This forum supports Markdown syntax, if you’re familiar.

Regards,
Alec Smecher
Public Knowledge Project Team

GET https://repository.westernsem.edu/pkp/index.php/rr/$$$call$$$/wizard/file-upload/file-upload-wizard/start-wizard?fileStage=3D10&reviewRoundId=3D&assoc=Type=3D521&assocId=3D1055&revisedFileId=3D1972&revisionOnly=3D1&submissionId=3D969&stageId=3D5&uploaderRoles=3D16-17-4097&uploaderGroupIds=3D&_=3D1492=022904697

Response:
{"status":true,"content":"\n<script type=3D\"text\/javascript\">\n\t\/\/Attach the JS file upload wizard handler.\n\t$(function(){\n\t\t$('#fileUploadWizard').pkpHandler(\n\t\t\t'$.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler',\n\t\t\t{\n\t\t\t\tcancelButtonText:\"Cancel\",\n\t\t\t\tcontinueButtonText:\"Continue\",\n\t\t\t\tfinishButtonText:\"Complete\",\n\t\t\t\tdeleteUrl:\"https:\\\/\\\/repository.westernsem.edu\\\/pkp\\\/index.php\\\/rr\\\/$$$call$$$\\\/api\\\/file\\\/manage-file-api\\\/delete-file?submissionId=3D969&stageId=3D5&fileStage=3D10&suppressNotification=3D1\",\n\t\t\t\tmetadataUrl=\"https:\\\/\\\/repository.westernsem.edu\\\/pkp\\\/index.php\\\/rr\\\/$$$call$$$\\\/wizard\\\/file-upload\\\/file-upload-wizard\\\/edit-metadata?submissionId=3D969&stageId=3D5&reviewRoundId=3D&fileStage=3D10\",\n\t\t\t\tfinishUrl:\"https:\\\/\\\/repository.westernsem.edu\\\/pkp\\\/index.php\\\/rr\\\/$$$call$$$\\\/wizard\\\/file-upload\\\/file-upload-wizard\\\/finish-file-submission?submissionId=3D969&stageId=3D5&reviewRoundId=3D&fileStage=3D10\"\n\t\t\t}\n\t\t);\n\t});\n<\/script>\n\n<divid=3D\"fileUploadWizard\">\n\t<ul>\n\t\t<li><a href=3D\"https:\/\/repository.westernsem.edu\/pkp\/index.php\/rr\/$$$call$$$\/wizard\/file-upload\/file-upload-wizard\/display-file-upload-form?submissionId=3D969&amp;stageId=3D5&amp;uploaderRoles=3D16-17-4097&amp;uploaderGroupIds=3D&amp;fileStage=3D10&amp;revisionOnly=3D1&amp;reviewRoundId=3D&amp;revisedFileId=3D1972&amp;assocType=3D521&amp;assocId=3D1055&amp;dependentFilesOnly=3D\">1.Upload File<\/a><\/li>\n\t\t<li><a href=3D\"metadata\">2. ReviewDetails<\/a><\/li>\n\t\t<li><a href=3D\"finish\">3.Confirm<\/a><\/li>\n\t<\/ul>\n<\/div>","elementId":"0"}

GET https://repository.westernsem.edu/pkp/index.php/rr/$$$call$$$/wizard/file-upload/file-upload-wizard/display-file-upload-form?submissionId=3D969&stageId=3D5&uploaderRoles=3D16-17-4097&uploaderGroupIds=3D&fileStage=3D10&revisionOnly=3D1&reviewRoundId=3D&revisedFileId=3D1972&assocType=3D521&assocId=3D1055&dependentFilesOnly=3D&_=3D1492022904698

Response:
<h1>Invalid revised file id!</h1>

Hi @Steve_Michaels,

Can you double-check the URL you posted against what you see in the browser? There are lots of 3D codes in the URL that don’t look typical to me, but I wonder if this isn’t a side-effect of copy/paste or forum posting.

Regards,
Alec Smecher
Public Knowledge Project Team

GET https://repository.westernsem.edu/pkp/index.php/rr/$$$call$$$/wizard/file-upload/file-upload-wizard/start-wizard?fileStage=10&reviewRoundId=&assocType=521&assocId=1055&revisedFileId=1972&revisionOnly=1&submissionId=969&stageId=5&uploaderRoles=16-17-4097&uploaderGroupIds=&_=1492792609675
Response:
{"status":true,"content":"\n<script type=\"text\/javascript\">\n\t\/\/ Attach the JS file upload wizard handler.\n\t$(function() {\n\t\t$('#fileUploadWizard').pkpHandler(\n\t\t\t'$.pkp.controllers.wizard.fileUpload.FileUploadWizardHandler',\n\t\t\t{\n\t\t\t\tcancelButtonText: \"Cancel\",\n\t\t\t\tcontinueButtonText: \"Continue\",\n\t\t\t\tfinishButtonText: \"Complete\",\n\t\t\t\tdeleteUrl: \"https:\\\/\\\/repository.westernsem.edu\\\/pkp\\\/index.php\\\/rr\\\/$$$call$$$\\\/api\\\/file\\\/manage-file-api\\\/delete-file?submissionId=969&stageId=5&fileStage=10&suppressNotification=1\",\n\t\t\t\tmetadataUrl: \"https:\\\/\\\/repository.westernsem.edu\\\/pkp\\\/index.php\\\/rr\\\/$$$call$$$\\\/wizard\\\/file-upload\\\/file-upload-wizard\\\/edit-metadata?submissionId=969&stageId=5&reviewRoundId=&fileStage=10\",\n\t\t\t\tfinishUrl: \"https:\\\/\\\/repository.westernsem.edu\\\/pkp\\\/index.php\\\/rr\\\/$$$call$$$\\\/wizard\\\/file-upload\\\/file-upload-wizard\\\/finish-file-submission?submissionId=969&stageId=5&reviewRoundId=&fileStage=10\"\n\t\t\t}\n\t\t);\n\t});\n<\/script>\n\n<div id=\"fileUploadWizard\">\n\t<ul>\n\t\t<li><a href=\"https:\/\/repository.westernsem.edu\/pkp\/index.php\/rr\/$$$call$$$\/wizard\/file-upload\/file-upload-wizard\/display-file-upload-form?submissionId=969&amp;stageId=5&amp;uploaderRoles=16-17-4097&amp;uploaderGroupIds=&amp;fileStage=10&amp;revisionOnly=1&amp;reviewRoundId=&amp;revisedFileId=1972&amp;assocType=521&amp;assocId=1055&amp;dependentFilesOnly=\">1. Upload File<\/a><\/li>\n\t\t<li><a href=\"metadata\">2. Review Details<\/a><\/li>\n\t\t<li><a href=\"finish\">3. Confirm<\/a><\/li>\n\t<\/ul>\n<\/div>","elementId":"0"}

GET https://repository.westernsem.edu/pkp/index.php/rr/$$$call$$$/wizard/file-upload/file-upload-wizard/display-file-upload-form?submissionId=969&stageId=5&uploaderRoles=16-17-4097&uploaderGroupIds=&fileStage=10&revisionOnly=1&reviewRoundId=&revisedFileId=1972&assocType=521&assocId=1055&dependentFilesOnly=&_=1492792609676
Response:
<h1>Invalid revised file id!</h1>

Hi @Steve_Michaels,

Can you provide any background on that file – was it uploaded via the QuickSubmit plugin, or via the usual workflow, or upgraded from a previous OJS version?

Regards,
Alec Smecher
Public Knowledge Project Team

It was originally submitted via quickSubmit in 2.4.x and then upgraded to 3.0.

Hi @Steve_Michaels,

Hmm, that’s an awfully complicated setup to recreate over here. Would you be willing to provide me with a (suitably anonymized if you like) database dump?

Regards,
Alec Smecher
Public Knowledge Project Team

Wanted to note that I’ve also encountered this problem. We are unable to update/edit galleys for articles uploaded in 2.x and upgraded to 3.02.

Hi @nmp,

Can you describe the problem in detail? The original poster included error messages – did you encounter these as well?

Regards,
Alec Smecher
Public Knowledge Project Team

Unlike OP, I was using the GUI in my attempt to change/edit the galley. When we checked the apache error log, the error we found was the same as the first post (invalid file ID). We definitely don’t have this problem with journals that started out on 3.x.

I don’t have access to the logs right now, but I’ll try and get a copy to leave here. I do have a screencap of what happens with the GUI and this problem:

change-galley

The dialogue for uploading an article just doesn’t show up so there is no way to change the galley file.

Hi @nmp,

See if you can get the logs; those will be useful in debugging.

Regards,
Alec Smecher
Public Knowledge Project Team

image
I am having challenges in replacing galley file

Please help

Last I knew, this problem was still not nailed down by PKP.

Steve Michaels
Emerging Technologies Librarian

ph 616.392.8555 x187
101 East 13th Street, Holland MI 49423-3622
[image: WTS_logo_email.png]