I have successfully upgraded OJS from 2.4.3 to 3.1.0.1. The problem I have is that all supplementary files have been migrated to article galleys. That means that beside the real galleys (PDF format) also other files are open to the public. Note that on the 2.4.3. those supplementary files have not been open to the public.
How can I disable those supplementary files to be open to the public? I mean with either settings or direct changes in the DB.
Thank you for the info. Unfortuantely I should have known thsi before the migration
Next time I will know.
Any hint how to fix this after the migration?
There would be two possible solutions:
a) if you do not need them any more, to remove them
b) if you need them, to move them to Submission Files grid i.e. to ‘reload/redefine’ them as submission files.
If there are lots of them, so that you cannot do it manually, both solutions above would require some scripting i.e. manually changes in the DB and in the files folder.
I could eventually help witch scripting, depending on your needs and preferable solution…
I just upgraded an OJS 2.4.8.2 to OJS 3.1.1-2 and I got again problem with the supplementary files that are visible to the readers although not supposed to. It looks to me that the fix somehow has not been merged to the latest code.
No I haven’t applied these changes as I thought it is merged into the version 3.1.1. I mean that is how I understand the line bozana wants to merge 1 commit into pkp:ojs-stable-3_1_1 from bozana:3016-patch in the GitHub.
So, I have to apply the changes in the version 3.1.1-2 in order to get that fixed (before the upgrade of course). Correct?
Correct. Per default i.e. in the release code the supp files will be migrated as galleys and thus accessible for the readers… Those who do not want it so, would need to apply that patch…
Hi @bozana,
Unfortunately we were not aware of this issue and updated our websites. there are around 50 updated journals and over 10000 published articles, so we can not remove or redefine the files manually. Can you point out which tables in the database should be modified to move supplementary files from galley to submission file?
How many such supplementary files does your installation have? You can use this SQL to figure that out: SELECT sf.* FROM submission_files sf, genres g, submission_supplementary_files ssf WHERE sf.file_id = ssf.file_id AND sf.revision = ssf.revision AND sf.file_stage = 10 AND sf.assoc_type = 521 AND sf.genre_id = g.genre_id AND g.supplementary = 1
If too many you would probably need to use a script – it cannot be fixed just changing an entry in the DB – also files in the files folder has to be moved…
Hi @bozana,
changing genre settings was not helping, so, I compromised and changed the DB for published article files. it is not the perfect method and created some problems, but nothing else could be done.