URL image HTML Galley in OJS3

Hi,

We are actually trying to migrate our journals under OJS2 to OJS3. We are running out of time to migrate what we have done using tools such as XML publishing toolset using Open Typesetting Stack.
We would like to display HTML content of our HTML galleys as we are doing now.

We encounter several problems. The first problem is that the “ArticleHTMLGalley” class no longer exists. We can no longer display the HTML content of the HTML galley directly.
We try to use the equivalent functions of the “HtmlArticleGalley” Plugin but we can’t find all the features.
For example, we can’t display images associated with the HTML galley.
With OJS2, images could be displayed via an URL of this type:
“Article / viewFile / [article_id] / html / [file_id]”

What is the equivalent URL under OJS3 to display images of galleys HTML?
Do you plan to put back specific HTML functions in OJS 3.1 like you did in OJS2 ?

Thank in advance for your help.
Best regards.
Helene

Greetings @hcl,

In this function (inside our JATSParser plugin for OJS3): https://github.com/Vitaliy-1/JATSParserPlugin/blob/master/JatsParserPlugin.inc.php#L133
you can see how we call embedded XML Galley and associated (attached to the XML galley) images in png and jpeg format
edit: with HTML Galley you can do the same

Hi,

Thanks @Vitaliy for your answer.

In fact, “_getHTMLContents” function of “HtmlArticleGalley” Plugin works fine and is doing the job.
The good URL is generated.
I found several problems which come from elsewhere.

In OJS2 DB, images of an HTML galley are associated with the “article_html_galley_images” table but not with the “assoc_id” field of the “article_files” table which is NULL.
After DB migration, “assoc_id” fields of the “article_files” table remain NULL.
In OJS3, It seems that images of an HTML galley are associated with the “assoc_id” field of the “submission_files” table.

There are other fields of “submission_files” table that change too: assoc_type, file_stage and genre_id.

Moreover in OJS2, images are stored in the “public” directory and in OJS3, in the “submission/proof” directory.
After DB migration, images remain in “public” directory and are renamed with this pattern:[submission_id]-[genre_id]-[file_id]-[revision]-file_stage]-yyyyymm.png
But as datas in DB are wrong (in “submission_files” table), images names are wrong too.

So, I ask myself some questions.

Before DB migration, do I need:

  • to put a value in the “assoc_id” field of the “article_files” ?
  • to change file_stage with “17” value ?

Or do I need After migration:

  • to put a value in the “assoc_id” field of the “submission_files” table.
  • to change file_stage with “17” value ?
  • to add a genre_id value (46 for image/png) ?
  • to add an assoc_type value ?
  • to move image files from “public” directory to “submission/proof” directory ?
  • to rename image files with the good pattern :[submission_id]-[genre_id]-[file_id]-[revision]-file_stage]-yyyyymm.png ?

Thank in advance for your answer.
Best regards.
Helene

I am afraid this requires more OJS expertise level, than I have. Someone from PKP team definitely knows what is better. Maybe @asmecher?

Hi @hcl,

By coincidence, I ran into this on another installation just yesterday and came to the same conclusion. See Fix HTML galley image migration in OJS2 to OJS3 · Issue #2582 · pkp/pkp-lib · GitHub
for details – I’ll be working on this today.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
It’s amazing such a coincidence!
I write a comment on the github site about the genre_id field.
If it’s fixed, it’s great.
Thanks a lot.
Helene