EPrints Technical Mailing List Archive

Message: #05091


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

[EP-tech] Re: issue with on-behalf-of when depositing using SWORD 2


This looks like a fairly simple bug at these lines:

https://github.com/eprints/eprints/blob/de3b8d19f310efdbd993d07e9dfd57a15e103354/perl_lib/EPrints/Apache/CRUD.pm#L1735
https://github.com/eprints/eprints/blob/de3b8d19f310efdbd993d07e9dfd57a15e103354/perl_lib/EPrints/Apache/CRUD.pm#L1847
https://github.com/eprints/eprints/blob/de3b8d19f310efdbd993d07e9dfd57a15e103354/perl_lib/EPrints/Apache/CRUD.pm#L1849

Each line has a call that looks like these:

	sword_error( $repo, $r, %$on_behalf_of );
	sword_error($repo, $r, %$err )

...What's important is that the first two arguments should not be being passed, only the third one.  Change to:

	sword_error(%$on_behalf_of );
	sword_error(%$err )

Remove those and test it -- it should work.  If it does, please submit an issue on github.

--
Adam Field
Business Relationship Manager and Community Lead
EPrints Services
+44 (0)23 8059 8814





On 12 Nov 2015, at 16:28, Simon Cullen wrote:

> Hi
>  
> I am uploading to ePrints using a SWORD interface. I include “on-behalf-of” in the header and passing through the ePrints username. In instances where either:
> ·         The depositing user does not have “user/mediate” permission OR
> ·         the depositing user does not exist in the ePrints database
>  
> when I look into the Apache logs on the ePrints server I see the following:
>  
> Can't locate object method "repository" via package "EPrints::Repository" at /usr/share/eprints/perl_lib/EPrints/Apache/CRUD.pm line 1977.
>  
> Can some please advise on the issue.
> 
> Regards
> Simon Cullen
>  
> Director
>  
> <image003.png>
>  
> T:   + 353 (0) 1 5242400
> F:   + 353 (0) 1 4430773
> M: + 353 87 2723462
> E:   simon.cullen@vidatum.com   
> www.vidatum.com
>  
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: http://www.eprints.org/tech.php/
> *** EPrints community wiki: http://wiki.eprints.org/
> *** EPrints developers Forum: http://forum.eprints.org/