<font face="Default Sans Serif,Verdana,Arial,Helvetica,sans-serif" size="2">
Hi,<div><br></div><div>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.</div>
<div><br></div><div>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.</div>
<div><br></div><div>Any help would be greatly appreciated thanks.</div>
<div><br></div><div>--Mike</div><div><br></div><div>Thread from 10 years ago:</div>
<div>------</div><div><br></div><div><b style="font-family: Verdana, Georgia, serif; font-size: 14px;">
Fra:</b><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
owner-eprints-tech@xxxxxxxxxxxxxxx [mailto:owner-eprints-tech@xxxxxxxxxxxxxxx]</span>
<b style="font-family: Verdana, Georgia, serif; font-size: 14px;">På vegne af </b>
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">Christopher Gutteridge</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><b style="font-family: Verdana, Georgia, serif; font-size: 14px;">
Sendt:</b><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
12. maj 2005 15:09</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<b style="font-family: Verdana, Georgia, serif; font-size: 14px;">Til:</b>
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;"> EPrints.org Technical List</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><b style="font-family: Verdana, Georgia, serif; font-size: 14px;">
Emne:</b><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
Re: [EP-tech] Linefeeds in Abstract field</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
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.</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">It's easily worked around however by adding the a rendering parameter to the "abstract" field config in ArchiveMetadataFieldsConfig.pm:</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
----------------------</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">{ name => "abstract", input_rows => 10, type => "longtext", render_single_value=>sub {</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
my( $session, $field, $value ) = @_;</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
my @paras = split( /\r\n\r\n|\r\r|\n\n/ , $value );</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;"> my $frag = $session->make_doc_fragment();</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
foreach( @paras )</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;"> {</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
my $p = $session->make_element( </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
"p", </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
class=>$self->{name}."_paragraph" );</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
$p->appendChild( $session->make_text( $_ ) );</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
$frag->appendChild( $p );</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
}</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;"> return $frag;</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
} </span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">},</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
------------------</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">and restart apache and MAKE SURE IT WORKS,as i've just cut and pasted the code</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
then run generate_abstracts to fix the ones which are wrong.</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
The "render" paramters only effect how a value is converted to XHTML, so they can</span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
safely be played with without effecting the underlying data.</span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">Michael Street wrote: </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
Hi Folks, </span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
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. </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">Anyone know how I might be able to fix this? </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">I should mention that when I edit the eprint, the paragraphs are there, they just don't show up when you view it. </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<span style="font-family: Verdana, Georgia, serif; font-size: 14px;">Thanks in advance, </span>
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><span style="font-family: Verdana, Georgia, serif; font-size: 14px;">
Mike. </span><br style="font-family: Verdana, Georgia, serif; font-size: 14px;">
<br style="font-family: Verdana, Georgia, serif; font-size: 14px;"><pre class="moz-signature" cols="72" style="font-size: 14px;">
-- Christopher Gutteridge -- <a rel="nofollow" class="moz-txt-link-abbreviated" href="mailto:cjg@xxxxxxxxxxxxxxx" target="_blank">
<font color="#2b3eae">cjg@xxxxxxxxxxxxxxx</font></a> -- +44 (0)23 8059 4833
University of Southampton, School of Electronics and Computer ScienceChris is currently listening to: . Obligatory Random Quote: Shout
Britain, raise a joyful shout, The Tyrant Tories all are out -- Deluded Britains -- cease your din -- For lo -- the scoundrel Whigs
are in. -- Hartley Coleridge (1796-1849) </pre></div>
<div></div></font>