Upgrade OJS2 to OJS3: wrong genre_id generated for images

Hi,

When I upgrade from OJS2 to OJS3, all files of “submission_files” table have a genre_id=37 even images associated with an HTML galley file.
And they are named as follows in “submission/proof” directory: [submission_id]-37-[file_id]-[revision]-[file_stage]-yyyyymm.png
When I replace images files associated with the HTML galley file, they take a genre_id=46 in “submission_files” table and they are named as follows in “submission/proof” directory: [submission_id]-46-[file_id]-[revision]-[file_stage]-yyyyymm.png

Is it possible to modify update.xml files to set genre_id=46 for images associated with an HTML galley file ?

Thanks in advance.
Helene

Hi @hcl

I’ll take a look…

Thanks!
Bozana

Hi @bozana

1) Were you able to have a look to change the appropriate update.xml file in OJS upgrade directory to modify automatically genre_id for images associated with an HTML galley file ?

I have an other request.
In 3.0.0_update.xml file, there is the following UPDATE for layout files:
UPDATE submission_files SET file_stage = ‘10’ WHERE file_stage = ‘5’;
And files in the “/submission/layout” directory of OJS2 are moved in the “/submission/proof” directory of OJS3.

In our case, we would like to move layout files into the “Production Ready Files” section of OJS3. To do that, I saw we need to do the following UPDATE for layout files:
UPDATE submission_files SET file_stage = ‘11’ WHERE file_stage = ‘5’;

2) My question is: if we modify 3.0.0_update.xml file to change the file_stage to “11” instead of “10” for layout files, do the files in the “/submission/layout” directory of OJS2 will be moved automatically in the “/submission/productionReady” directory of OJS3 during upgrade or do we have to modify an other script do to that ?

Thanks in advance for your both answers.
Best regards.
Helene

Ahh… Sorry, apparently I have totally forgotten about this thread… :-\

The images migration should be solved in the OJS 3.1: s. Fix HTML galley image migration in OJS2 to OJS3 · Issue #2582 · pkp/pkp-lib · GitHub and Fix genre assignment for upgrades · Issue #2506 · pkp/pkp-lib · GitHub.

@hcl, I think the files will be automatically moved to the correct folder – this is happening in the function “migrateFiles” (s. ojs/upgrade.xml at ojs-3_1_0-0 · pkp/ojs · GitHub, i.e. at this code line: ojs/Upgrade.inc.php at ojs-3_1_0-0 · pkp/ojs · GitHub), that is called after the 3.0.0_update (s. ojs/upgrade.xml at ojs-3_1_0-0 · pkp/ojs · GitHub). But maybe to double check/test it first…

Best,
Bozana

Hi @bozana

I just installed OJS3.1 and made a complete migration from OJS2

The images migration is solved! Images associated with an HTML galley file have now the good genre_id.

And in 3.0.0_update.xml, I changed file_stage to “11” instead of “10” for layout files, the files in the “/submission/layout” directory of OJS2 have been automatically moved in the “/submission/productionReady” directory of OJS3.

All is perfect. Thanks a lot.

Best regards.
Helene