EPrints Technical Mailing List Archive
Message: #04162
< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First
[EP-tech] Re: (no subject)
- To: eprints-tech@ecs.soton.ac.uk
- Subject: [EP-tech] Re: (no subject)
- From: Michael Street <mstreet@yorku.ca>
- Date: Thu, 23 Apr 2015 08:55:23 -0400
Thank you so much, just what I needed!
-----eprints-tech-bounces@ecs.soton.ac.uk wrote: -----
From: John Salter
Sent by: eprints-tech-bounces@ecs.soton.ac.uk
Date: 04/22/2015 11:36AM
Subject: [EP-tech] Re: (no subject)
Hi Mike,
I think this is the most recent incantation of that issue:
http://www.eprints.org/tech.php/18737.html
NB The mailing list breaks perl code (e.g. changing ‘@_’ to ‘AT _’) – although I’m sure you’ll be able to make sense of it!
Does that thread help?
Cheers,
John
From:
eprints-tech-bounces@ecs.soton.ac.uk [mailto:eprints-tech-bounces@ecs.soton.ac.uk]
On Behalf Of Michael Street
Sent: 22 April 2015 16:09
To: eprints-tech@ecs.soton.ac.uk
Subject: [EP-tech] (no subject)
Hi,
I recently migrated from v2 to v3 and am strangely enough, having the exact same issue I did 10 years ago, the last time I upgraded. I managed to dig up an old thread I
had posted in 2005 with the same situation. Essentially it's that all the abstracts seem to no longer be displayed with their line breaks/paragraphs. When editing the field, the paragraphs are there but they are not displayed on the summary page.
I've tried the fix from 10 years ago but as you might expect, that did not work. I tried sticking the code snippet into eprint_field.pl.
Any help would be greatly appreciated thanks.
--Mike
Thread from 10 years ago:
------
Fra:
owner-eprints-tech@xxxxxxxxxxxxxxx [
mailto:owner-eprints-tech@xxxxxxxxxxxxxxx]
På vegne af
Christopher Gutteridge
Sendt: 12. maj 2005 15:09
Til:
EPrints.org Technical List
Emne: Re: [EP-tech] Linefeeds in Abstract field
Hmm. I'm not sure why that changed. The default rendering for fields of type "longtext" appears to just turn them into a single block of text now.
It's easily worked around however by adding the a rendering parameter to the "abstract" field config in ArchiveMetadataFieldsConfig.pm:
----------------------
{ name => "abstract", input_rows => 10, type => "longtext", render_single_value=>sub {
my( $session, $field, $value ) = @_;
my @paras = split( /\r\n\r\n|\r\r|\n\n/ , $value );
my $frag = $session->make_doc_fragment();
foreach( @paras )
{
my $p = $session->make_element(
"p",
class=>$self->{name}."_paragraph" );
$p->appendChild( $session->make_text( $_ ) );
$frag->appendChild( $p );
}
return $frag;
}
},
------------------
and restart apache and MAKE SURE IT WORKS,as i've just cut and pasted the code
then run generate_abstracts to fix the ones which are wrong.
The "render" paramters only effect how a value is converted to XHTML, so they can
safely be played with without effecting the underlying data.
Michael Street wrote:
Hi Folks,
I migrated an EPrints archive from v2 to v2.3.7 on a new server. Everything seems in order except for the linefeeds and paragraphs in the Abstract field. In the old version they show up fine, but in the new version it is all one paragraph.
Anyone know how I might be able to fix this?
I should mention that when I edit the eprint, the paragraphs are there, they just don't show up when you view it.
Thanks in advance,
Mike.
*** Archive: http://www.eprints.org/tech.php/
*** EPrints community wiki: http://wiki.eprints.org/
*** EPrints developers Forum: http://forum.eprints.org/
- References:
- [EP-tech] upgrading IRStats to IRStats2
- From: Matthew Kerwin <matthew.kerwin@qut.edu.au>
- [EP-tech] (no subject)
- From: Michael Street <mstreet@yorku.ca>
- [EP-tech] Re: (no subject)
- From: John Salter <J.Salter@leeds.ac.uk>
- [EP-tech] upgrading IRStats to IRStats2
- Prev by Date: [EP-tech] Re: reordering documents
- Next by Date: [EP-tech] Antwort: Re: reordering documents
- Previous by thread: [EP-tech] Re: (no subject)
- Next by thread: [EP-tech] Re: upgrading IRStats to IRStats2
- Index(es):