<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=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><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:Consolas;
        panose-1:2 11 6 9 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman",serif;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
pre
        {mso-style-priority:99;
        mso-style-link:"Préformaté HTML Car";
        margin:0cm;
        margin-bottom:.0001pt;
        font-size:10.0pt;
        font-family:"Courier New";}
span.PrformatHTMLCar
        {mso-style-name:"Préformaté HTML Car";
        mso-style-priority:99;
        mso-style-link:"Préformaté HTML";
        font-family:Consolas;}
span.EmailStyle19
        {mso-style-type:personal-reply;
        font-family:"Calibri",sans-serif;
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.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=FR-CA link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Hi David!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>I’ve tried your fix on our test server and it works!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>We would never have figured that one on our own. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Thank you so much!<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'>Robin<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif;color:#1F497D;mso-fareast-language:EN-US'><o:p>&nbsp;</o:p></span></p><div><div style='border:none;border-top:solid #E1E1E1 1.0pt;padding:3.0pt 0cm 0cm 0cm'><p class=MsoNormal><b><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif'>De&nbsp;:</span></b><span lang=EN-CA style='font-size:11.0pt;font-family:"Calibri",sans-serif'> David R Newman [mailto:drn@ecs.soton.ac.uk] <br><b>Envoyé&nbsp;:</b> 22 septembre 2015 12:11<br><b>À&nbsp;:</b> eprints-tech@ecs.soton.ac.uk<br><b>Objet&nbsp;:</b> [EP-tech] Re: &quot;Manage deposits&quot; list not sorting<o:p></o:p></span></p></div></div><p class=MsoNormal><span lang=EN-CA><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-CA>Hi Robin,<br><br>I think I have got to the bottom of this issue and it is a fairly simple fix but was an absolute pain to diagnose.&nbsp; Hopefully this will fix your problem as well.<br><br>It looks like MariaDB does not sort sub-queries which is needed by EPrints to reorder an EPrints<span style='color:#1F497D'> </span>::List.&nbsp; This is how the ordering of the table on the Manage Deposits page is ordered.&nbsp; More detail can be found on this issue on MariaDB at:<br><br></span><a href="https://mariadb.com/kb/en/mariadb/why-is-order-by-in-a-from-subquery-ignored/"><span lang=EN-CA>https://mariadb.com/kb/en/mariadb/why-is-order-by-in-a-from-subquery-ignored/</span></a><span lang=EN-CA><br><br>I am not sure if this is only an issue with MariaDB or whether later versions of MySQL have the same issue.&nbsp; Therefore, even if you are running MySQL it is worth giving my (slightly hacky) fix a try.<br><br>Below is a rough diff of what I needed to change in perl_lib/Database/mysql.pm to make things work:<br><br>--- mysql.pm (revision 9244)<br>+++ mysql.pm (working copy)<br>@@ -397,7 +397,9 @@<br>$sql .= &quot;($Q_pos, $Q_keyname)&quot;;<br>$sql .= &quot; SELECT </span><a href="mailto:\@i"><span lang=EN-CA>\@i</span></a><span lang=EN-CA>:=</span><a href="mailto:\@i"><span lang=EN-CA>\@i</span></a><span lang=EN-CA>+1, $Q_keyname&quot;;<br>- $sql .= &quot; FROM ($select_sql) &quot;.$self-&gt;quote_identifier( &quot;S&quot; );<br>+ # MariaDB does not order sub-queries unless limited. Using limit of 2^31-1 in case any system is using a signed 32-bit integer.<br>+ my $limit = &quot; LIMIT 2147483647&quot;;<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $limit = &quot;&quot; if $select_sql =~ /LIMIT/;<br>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; $sql .= &quot; FROM ($select_sql$limit) &quot;.$self-&gt;quote_identifier( &quot;S&quot; );<br><br>$self-&gt;do( $sql );<br>}<br><br>Hope this helps,<br><br>David Newman<br><br><br><br><br><br>On Tue, 2015-09-15 at 19:44 +0100, Adam Field wrote:<br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>Oooohhhh, complicated <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>OK, you'll need to check the user record to see which columns they have turned on, and then order by the first one, as I believe that is the one default ordering applies to. <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>A better idea, though, would be to figure out what's going on. <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>Is anyone else on the list experiencing this problem? <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>-- <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>Adam Field <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>Business Relationship Manager and Community Lead<br>EPrints Services <o:p></o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>On 8 Sep 2015, at 14:30, Robin Sylvestre &lt;</span><a href="mailto:robin.sylvestre@polymtl.ca"><span lang=EN-CA>robin.sylvestre@polymtl.ca</span></a><span lang=EN-CA>&gt; wrote: <o:p></o:p></span></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>Thank you Adam!<br><br>I can confirm it works better now, although there is still one thing left. <br>When we get to the &quot;manage deposits&quot; list, it always appears as if sorted by <br>descending eprint ids, regardless of what should be the active column. The <br>list gets sorted correctly only after we click on the column's title.<br><br>For instance, see the attached screenshots: When the page is loaded <br>(screenshot001) and what it should be (screenshot002).<br><br>Any ideas?<br><br>Robin Sylvestre<br><br><br><br>-----Message d'origine-----<br>De : Field A.N. [</span><a href="mailto:af05v@ecs.soton.ac.uk"><span lang=EN-CA>mailto:af05v@ecs.soton.ac.uk</span></a><span lang=EN-CA>]<br>Envoyé : 7 septembre 2015 06:45<br>À : </span><a href="mailto:eprints-tech@ecs.soton.ac.uk"><span lang=EN-CA>eprints-tech@ecs.soton.ac.uk</span></a><span lang=EN-CA><br>Objet : [EP-tech] Re: &quot;Manage deposits&quot; list not sorting<br><br>I've seen this issue before -- in the case I examined, it looked like the <br>_buffer_order parameter was somehow being lost. &nbsp;I managed to get it working <br>with the following code in the Items plugin:<br><br>in the 'properties_from' function:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#af05v 20150512 Workaround for immediate solution to lack of <br>ordering<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $order = $session-&gt;param('_buffer_order');<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;$self-&gt;{processor}-&gt;{af05v_order} = $order;<br><br><br>in the perform_search function:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;my $list = $self-&gt;{session}-&gt;current_user-&gt;owned_eprints_list( <br>%$search, # custom_order =&gt; $search-&gt;{order}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;#af05v 20150512 Workaround for immediate solution to lack of <br>ordering<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;custom_order =&gt; $self-&gt;{processor}-&gt;{af05v_order}<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;);<br><br>However, I didn't have time to figure out *why* this was happening. &nbsp;Anyone <br>have any ideas?<br><br>--<br>Adam Field<br>Business Relationship Manager and Community Lead EPrints Services<br>+44 (0)23 8059 8814<br><br><br><br><br><br>On 2 Sep 2015, at 17:48, Robin Sylvestre wrote:<br><br><br><o:p></o:p></span></p><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal><span lang=EN-CA>Hello fellow EPrinters,<br><br>Running version 3.3.14, we have noticed a strange behavior on the “manage <br>deposits” screen. Items do not sort at all, when clicking on the <br>appropriate column title (see attached screen shots). Nothing changes, <br>only the up/down arrow appears.<br><br>The strange thing is that the “revision” list is not affected by this bug, <br>only the “deposits” list.<br><br>I have tried to do a “epadmin reorder [archive] eprint” but that does not <br>correct the problem. Both of our live and test versions have this problem.<br><br>Did anyone notice a similar bug or has a solution to offer? </span>Thanks!!<br><br><br><br>Robin Sylvestre<br>Technicien en documentation<br>Bibliothèque - Services techniques et systèmes informatisés École<br>Polytechnique de Montréal<br>Tél.: 514-340-4711 poste 3743<br><br>&lt;ScreenShot001.png&gt;&lt;ScreenShot003.png&gt;*** Options:<br><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech">http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</a><br>*** Archive: <a href="http://www.eprints.org/tech.php/">http://www.eprints.org/tech.php/</a><br>*** EPrints community wiki: <a href="http://wiki.eprints.org/">http://wiki.eprints.org/</a><br>*** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a><o:p></o:p></p></blockquote><p class=MsoNormal style='margin-bottom:12.0pt'><br><br><br><span lang=EN-CA>&lt;ScreenShot001.png&gt;&lt;ScreenShot002.png&gt;*** Options: </span><a href="http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech"><span lang=EN-CA>http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech</span></a><span lang=EN-CA><br>*** Archive: </span><a href="http://www.eprints.org/tech.php/"><span lang=EN-CA>http://www.eprints.org/tech.php/</span></a><span lang=EN-CA><br>*** EPrints community wiki: </span><a href="http://wiki.eprints.org/"><span lang=EN-CA>http://wiki.eprints.org/</span></a><span lang=EN-CA><br>*** EPrints developers Forum: </span><a href="http://forum.eprints.org/"><span lang=EN-CA>http://forum.eprints.org/</span></a><span lang=EN-CA><o:p></o:p></span></p></blockquote></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><p class=MsoNormal style='margin-bottom:12.0pt'><span lang=EN-CA><o:p>&nbsp;</o:p></span></p></blockquote><blockquote style='margin-top:5.0pt;margin-bottom:5.0pt'><pre><span lang=EN-CA><o:p>&nbsp;</o:p></span></pre><pre>*** 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></pre><pre><span lang=EN-CA>*** Archive: </span><a href="http://www.eprints.org/tech.php/"><span lang=EN-CA>http://www.eprints.org/tech.php/</span></a><span lang=EN-CA><o:p></o:p></span></pre><pre><span lang=EN-CA>*** EPrints community wiki: </span><a href="http://wiki.eprints.org/"><span lang=EN-CA>http://wiki.eprints.org/</span></a><span lang=EN-CA><o:p></o:p></span></pre><pre>*** EPrints developers Forum: <a href="http://forum.eprints.org/">http://forum.eprints.org/</a><o:p></o:p></pre></blockquote><p class=MsoNormal><o:p>&nbsp;</o:p></p></div></body></html>