EPrints Technical Mailing List Archive

Message: #06061

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

Re: [EP-tech] EPrints CRUD module returning a 500 error



I encountered the same problem when trying to add posts using SWORD.  If comment out the failing code in CRUD.pm to


                #return $self->send_response(


                        #$atom->param( "mimetype" ),

                        #$atom->output_dataobj( $items[0] ),

                #       'HTTP_CREATED',

                #        'application/atom+xml',

                #        'text',


I can both extract and add posts.  From what I understand this is some a debug code which seems to have been left by mistake (?).  Those better reading code are most welcome to comment on this – I may be VERY wrong!


However, removing/commenting out the rows above, adding an Eprints XML file (NewPosts.xml) to the archive is without problem:


christer@honeybee:~/test$ curl -X POST -i -u my_username:my_password --data-binary "@NewPosts.xml" -H 'Content-Type: application/vnd.eprints.data+xml' http://pub-dev21.slub.se/id/contents

HTTP/1.1 100 Continue


HTTP/1.1 200 OK

Date: Fri, 28 Oct 2016 13:00:12 GMT

Server: Apache/2.4.18 (Ubuntu)

Location: http://pub-dev21.slub.se/id/eprint/13823

Content-Length: 0


And yes, the post appears in the archive J






From: eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk] On Behalf Of Andrew Hercules
Sent: den 23 juni 2016 13:29
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] EPrints CRUD module returning a 500 error


Hi all,


I'm attempting to create a new EPrints record using the CRUD module. To test that I can access the repository, I'm using the example provided in the documentation. When I run the command from my terminal, I get the following response:


HTTP/1.1 500 Internal Server Error

Date: Thu, 23 Jun 2016 11:17:13 GMT

Server: Apache

Location: http://w01.eprintstest.da.ulcc.ac.uk/id/eprint/5252

Content-Length: 616

Connection: close

Content-Type: text/html; charset=iso-8859-1




<title>500 Internal Server Error</title>


<h1>Internal Server Error</h1>

<p>The server encountered an internal error or

misconfiguration and was unable to complete

your request.</p>


Weirdly, it returns a 500 Internal Server Error, yet it creates the EPrint record and puts it into the buffer. When I check the Apache logs, I see the following error message:


"Can't call method "param" on an undefined value at /perl_lib/EPrints/Apache/CRUD.pm line 1423"

When I review /perl_lib/EPrints/Apache/CRUD.pm line 1423, I see the following: 


return $self->send_response( HTTP_CREATED, $atom->param( "mimetype" ), $atom->output_dataobj( $items[0] ), );


Has anybody seen this error before? If so, could you point me in the direction of a possible solution?

Thanks! :)





Andrew Hercules

Developer & UX Researcher

University of London Computer Centre

Senate House, Malet Street, London WC1E 7HU

T: +44 (0)20 7863 1342