Importing Articles with Cover Images

ojs3
import

#1

Hello,

I recently worked on migrating a journal from an older self-coded platform to OJS3. Our editors would like to import all the older issues into our new OJS3-journal. So I was looking into the corresponding entry in the admin guide and the sample files provided there.

I couldn’t find any info on how to attach a cover image to an article in the sample files. However, the XML schema for OJS defines an element named cover (cf. lines 171-180):

<element name="cover">
	<complexType>
		<sequence>
			<element name="cover_image" type="string" minOccurs="1" maxOccurs="1" />
			<element name="cover_image_alt_text" type="string" minOccurs="1" maxOccurs="1" />
			<element name="embed" type="pkp:embed" />
		</sequence>
		<attribute name="locale" type="string" />
	</complexType>
</element>

Now I’m not the fittest when it comes to XML but I don’t quite get what the first element in the sequence does and what it should look like, but I understand it is required, right?

I tried to export already published articles that have cover images but the resulting XML didn’t feature them. And as expected, when I imported the XML file again, the articles where without covers.

Could you please give me an example of a well-formatted, OJS3-importable XML file of an article with a cover image (or an issue with many articles that each has a cover image) would look like? That would be really great!

Thanks in advance!


#2

Hi @1Name

It seems like article covers are still not considered in OJS native export and import.
Please track this GitHub Issue for changes/developments on that: https://github.com/pkp/pkp-lib/issues/4294.

Best,
Bozana


#3

Thanks for your reply and opening the GitHub Issue, @bozana !

Do you know if there is any further documentation on the import/export formats? The admin guide and the example files don’t really provide a lot of information on what the single elements do and how they should be used to achieve desired results (such as the cover element, but also, for example, seq elements and attributes).

Maybe I should open another topic for that…


#4

Hi @1Name

I think there is no comprehensive documentation, but a few example xml documents…
Please do not hesitate to ask, if something is not clear…

Best,
Bozana


#5

Hi @bozana

Thankfully, the XML-import is not too strict and I managed to generate well(-enough)-formed and importable issue-files in a pretty straight-forward way :slight_smile:

However, my institution’s OJS installation didn’t respond well to neither a <covers> nor <cover> sub-element of <article>. This is the error message the system returns multiple times (once for each article in the issue, I guess):
Element '{http://pkp.sfu.ca}cover': This element is not expected. Expected is one of ( {http://pkp.sfu.ca}abstract, {http://pkp.sfu.ca}coverage, {http://pkp.sfu.ca}type, {http://pkp.sfu.ca}source, {http://pkp.sfu.ca}rights, {http://pkp.sfu.ca}licenseUrl, {http://pkp.sfu.ca}copyrightHolder, {http://pkp.sfu.ca}copyrightYear, {http://pkp.sfu.ca}keywords, {http://pkp.sfu.ca}agencies ).

I believe this is due to this installation’s native XML import/export plugin not yet featuring article covers, am I right?

Since I am only a journal manager in a multi-journal university-wide OJS installation to which I have no access, I wanted to ask:

  1. if you can give an estimate on when the changes proposed in your GitHub issue will be released in an updated version - or is it possible to update only the native XML import/export plugin to feature article-covers? If so, I could ask the installation administrators to apply the plugin update, which can probably more easily do than an entire system update.
  2. if you know of any other way to mass-import article-covers to already existing articles.

Thank You!


#6

Hi @1Name

The next release containing that change will probably come in the second half of January.
If you need it earlier, your system admin could apply a patch with these changes:https://github.com/pkp/ojs/pull/2214/files.
Unfortunately, there is no other way to mass-import article covers…

Best,
Bozana