EPrints Technical Mailing List Archive

See the EPrints wiki for instructions on how to join this mailing list and related information.

Message: #04094


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

[EP-tech] Re: URI: leads to broken link


$self->{database} should be $self->{dataset} 

(good spot Seb)


Justin
 
On 24 Mar 2015, at 13:51, peter <pjw@repositoryservices.co.uk> wrote:

Hi
A quick update on this one. The two solutions below do fix the problem
of the broken link but could result in the wrong plugin being selected
during content negotiation.
The summary page should be the highest priority for id/eprint/123 but if
the database is not set in the hash then the wrong plugin will be
selected so an alternative solution would be something like:

my $base_id = "";
$base_id = $self->{database}->base_id if $self->{database};
if( ( $self->scope == CRUD_SCOPE_DATAOBJ && $base_id ne "subject" ) ||
$self->scope == CRUD_SCOPE_USER_CONTENTS )

Thanks
Peter

--
Peter J. West
Digital Repository Services Ltd


On 03/03/15 10:35, Lizz Jennings wrote:

This seems to be a bug in 3.3.13

The issue is on line 897 of:

/perl_lib/EPrints/Apache/CRUD.pm

Replace it with either (my solution):

if( $self->scope == CRUD_SCOPE_DATAOBJ || $self->scope ==
CRUD_SCOPE_USER_CONTENTS )

or (Gunnar Wolf’s solution):

if( ( $self->scope == CRUD_SCOPE_DATAOBJ && $self->{database} &&
$self->{database}->base_id ne "subject" ) || $self->scope ==
CRUD_SCOPE_USER_CONTENTS )

Lizz

--

Lizz Jennings BA MSc ACLIP MCLIP (Revalidated 2014)

Technical Data Officer

The Library 4.10, University of Bath, Bath, BA2 7AY UK

Ext. 3570 (External 01225 383570)

E.Jennings@bath.ac.uk <mailto:E.Jennings@bath.ac.uk>__

Research Data Management: http://www.bath.ac.uk/research/data

*From:*eprints-tech-bounces@ecs.soton.ac.uk
[mailto:eprints-tech-bounces@ecs.soton.ac.uk] *On Behalf Of *pgasinos pgs
*Sent:* 03 March 2015 09:39
*To:* eprints-tech@ecs.soton.ac.uk
*Subject:* [EP-tech] URI: leads to broken link

I have noticed that in every item at the end of meta-data there is a
URI link, for example:

URI: http://www.myserver.com/id/eprint/85
<http://www.myserver.com/id/eprint/85> that is a broken link (because
it works without the /id/eprint). Why you added that by default? How
could I get rid of it?

Kostas Pgasinos



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

--
Justin Bradley
Senior Software Consultant
jb4@ecs.soton.ac.uk
EPrints Services
Bay 2, 3081, B32
University of Southampton