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

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



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 at bath.ac.uk <mailto:E.Jennings at bath.ac.uk>__
>
> Research Data Management: http://www.bath.ac.uk/research/data
>
> *From:*eprints-tech-bounces at ecs.soton.ac.uk 
> [mailto:eprints-tech-bounces at ecs.soton.ac.uk] *On Behalf Of *pgasinos pgs
> *Sent:* 03 March 2015 09:39
> *To:* eprints-tech at 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/