Issue with supplementary files after upgrading to OJS 3.1.0.1

Hello,

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.

Regards, Primož

Tagging @bozana here.

This is related to the issue described here: supplementary files migration · Issue #3016 · pkp/pkp-lib · GitHub

1 Like

Hi @ajnyga and @bozana

Thank you for the info. Unfortuantely I should have known thsi before the migration :frowning:
Next time I will know.
Any hint how to fix this after the migration?

Best regards, Primož

If you do not have many, you could just go to the article workflow to the production tab and remove the galleys you do not want to be public.

Hi @primozs

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…

Best,
Bozana

1 Like

Hi @bozana,

thank you for your help. There are about 30 of them. I guess I will manually reload them.

Best regards, Primož

Hi @bozana,

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.

Can you please verify what has gone wrong?

Best regards, Primož

Hi @primozs

Did you apply these changes/patch before doing the upgrade: pkp/pkp-lib#3016 patch not to migrate supp files as galleys but as su… by bozana · Pull Request #2021 · pkp/ojs · GitHub ? – This will leave all the supp files in the submission files grid and not migrate them as galleys.

Best,
Bozana

Hi @bozana,

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?

Best regards, Primož

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…

1 Like

Thank you for the clarification.

Best regards, Primož

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?

Hi @alirezaaa

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…

Best,
Bozana

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.

If somebody is still looking for a solution for this, take a look to this post: