[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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



Hi Adam

Thanks for getting back to me. I removed the two arguments into the sword_error subroutine but I am now getting the error message:
Can't locate object method "request" via package "summary" (perhaps you forgot to load "summary"?) at /usr/share/eprints/perl_lib/EPrints/Apache/CRUD.pm line 1976.

Unfortunately I don't know PERL well at all - Any other thoughts?

Regards

Simon

-----Original Message-----
From: eprints-tech-bounces at ecs.soton.ac.uk [mailto:eprints-tech-bounces at ecs.soton.ac.uk] On Behalf Of Field A.N.
Sent: Thursday 12 November 2015 16:44
To: eprints-tech at ecs.soton.ac.uk
Subject: [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 at 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/


*** 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/