<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<!--[if !mso]><style>v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style><![endif]--><style><!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:"Segoe UI";
        panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri",sans-serif;
        mso-fareast-language:EN-US;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:#0563C1;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:#954F72;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"HTML Preformatted Char";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri",sans-serif;
        color:windowtext;}
span.HTMLPreformattedChar
        {mso-style-name:"HTML Preformatted Char";
        mso-style-priority:99;
        mso-style-link:"HTML Preformatted";
        font-family:"Courier New";
        mso-fareast-language:EN-GB;}
.MsoChpDefault
        {mso-style-type:export-only;
        mso-fareast-language:EN-US;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 72.0pt 72.0pt 72.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-GB" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hi Muizzudin, <o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This problem is due to the fact that there seems to be a bug in the render_content subroutine in
<span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;background:white">
cfg/plugins/EPrints/Plugin/MePrints/Widget/LatestEPrints.pm</span>.<o:p></o:p></p>
<p class="MsoNormal">Basically the new added items are added at the “wrong side” of the queue, giving the impression that the list does not change (while actually, it does).
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The problem is caused by the fact that, for some reason, <o:p>
</o:p></p>
<p class="MsoNormal"><i>$items->reorder( 'datestamp' ); <o:p></o:p></i></p>
<p class="MsoNormal">is not actually sorting the list as it should.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">So you should be able to fix the issue easily by adding: <o:p>
</o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><i>$items->{ids} = [reverse @{$items->{ids} } ];<o:p></o:p></i></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Or something similar (depending on how you want to sort the list) after the malfunctioning reorder statement in the render_content subroutine .<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">You will then need to refresh the Meprints pages, and the issue should be solved.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">I hope it can be of help!<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Michele<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#7F7F7F;mso-fareast-language:EN-GB">Michele Morelli</span></b><b><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:black;mso-fareast-language:EN-GB"><br>
</span></b><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast-language:EN-GB">Research Technologies Junior Developer<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast-language:EN-GB">CoSector – University of London<o:p></o:p></span></p>
<p class="MsoNormal"><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast-language:EN-GB">Senate House, Malet Street, London WC1E 7HU<o:p></o:p></span></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#7F7F7F;mso-fareast-language:EN-GB"><br>
Direct: </span></b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#7F7F7F;mso-fareast-language:EN-GB">0207 862 8180<br>
<b>Email</b>: <a href="mailto:michele.morelli@cosector.com">mailto:michele.morelli@cosector.com</a></span><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:gray;mso-fareast-language:EN-GB"><br>
<b>Web</b>: </span><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#767171;mso-fareast-language:EN-GB"><a href="http://www.cosector.com/research-technologies">http://www.cosector.com/research-technologies</a></span><u><span lang="EN-US" style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#0563C1;mso-fareast-language:EN-GB"><o:p></o:p></span></u></p>
<p class="MsoNormal" style="margin-bottom:12.0pt"><b><span style="font-size:9.0pt;font-family:"Arial",sans-serif;color:#7F7F7F;mso-fareast-language:EN-GB"><img border="0" width="200" height="34" id="Picture_x0020_1" src="cid:image003.png@01D4388C.9AFDACC0" alt="CoSector Blue Black T RGB Horizontal small"></span></b><span style="font-size:9.0pt;color:#7F7F7F;mso-fareast-language:EN-GB"><o:p></o:p></span></p>
<pre><span style="color:black"><br><br><o:p></o:p></span></pre>
<pre><span style="color:black">On Sat, Aug 11, 2018, 11:31 MUIZZUDIN BIN KASPOL / PSAS <<o:p></o:p></span></pre>
<pre><span style="color:black"><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">muizzudin at upm.edu.my</a>> wrote:<o:p></o:p></span></pre>
<pre><span style="color:black"><o:p> </o:p></span></pre>
<pre><span style="color:black">><i><o:p> </o:p></i></span></pre>
<pre><span style="color:black">><i> I'm having a problem with MePrints Latest Additions display in user<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> profile.<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i><o:p> </o:p></i></span></pre>
<pre><span style="color:black">><i> As example when I have deposited a new record and try to display at<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> <a href="http://urldaomain/cgi/latest">http://urldaomain/cgi/latest</a> it indicates a new record have been added,<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> but when I click on my user profile at <a href="http://urldomain/profile/userid,">http://urldomain/profile/userid,</a><o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> the new deposited record is not showing in the latest addition list. It<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> seems that the record only shows 10 previous records and not latest records.<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i><o:p> </o:p></i></span></pre>
<pre><span style="color:black">><i> I've tried to disable and uninstall MePrints plugin through EPrints Bazaar<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> and re-install the MePrints plugins back, but the problem hasn't been<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> solved yet.<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i><o:p> </o:p></i></span></pre>
<pre><span style="color:black">><i> Best Regards,<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i><o:p> </o:p></i></span></pre>
<pre><span style="color:black">><i> Muizzudin<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> Librarian,<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> Universiti Putra Malaysia.<o:p></o:p></i></span></pre>
<pre><span style="color:black">><i><o:p> </o:p></i></span></pre>
<pre><span style="color:black">><i> *** Options: <a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> *** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> *** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><o:p></o:p></i></span></pre>
<pre><span style="color:black">><i> *** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a></i><o:p></o:p></span></pre>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>