Sword not able to disposit galleys in OJS 3

Hi,

I have two problems when using the sword plugin in OJS 3.1.1-4:

  1. $submissionFile->getLocalizedName() returns e.g. “admin, Zeitschriftenverwalter/in, dummy_pdf_2.pdf” in OJSSwordDeposit, function _addFile (in $targetFilename and in this->_package).

  2. The service document has a different URL than the deposit point on our sword server. But the plugin tries to get the service document from the deposit point url in DepositPointsHelper → loadCollectionsFromServer ($doc = $client->servicedocument($url, …))

When I “fix” these problems by hard coding the right variables, the plugin works fine.

best,
Carola

Hi @carola,

For #1: I’m guessing you’d prefer the submission title, rather than the file name, correct? My concern is that submissions with several files would then all get the same name.

For #2: What type of deposit are you doing? There are 4 options, and depending which you use, you’ll need to either provide the deposit point or the service document in the URL field.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

#1: The submission title would be best + galleyid or number? Or only “dummy_pdf_2.pdf” (original file name)?

As it is, it simply does not work:

PHP Warning: copy(/tmp/swordx279PY/files/admin, Zeitschriftenverwalter/in, dummy_pdf_2.pdf): failed to open stream: No such file or directory in /data/ojs/…/plugins/generic/sword/classes/OJSSwordDeposit.inc.php on line 117, referer:…

#2: Ah, you’re right. I do not need to specify the deposit point, since it will be delivered by the service document. I tried it and it worked!

thanks!
Carola

Hi @carola,

Ah, I see – maybe the original file name would be best in this situation (I suspect something like a urlencoded title would be too messy). Can you check whether using getOriginalFileName instead of getLocalizedName works as expected? (I don’t have a test environment set up at the moment.)

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @smecher,

Can you check whether using getOriginalFileName instead of getLocalizedName works as expected? (I don’t have a test environment set up at the moment.)

I checked it and it works, pdf and html documents were deposited in DSpace.

best,
Carola

Hi @carola,

Thanks, I’ve committed that for the next release of the plugin.

Regards,
Alec Smecher
Public Knowledge Project Team