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

[EP-tech] MePrints - Latest Additions view not updated

Hi Muizzudin,

This problem is due to the fact that there seems to be a bug in the render_content subroutine in cfg/plugins/EPrints/Plugin/MePrints/Widget/LatestEPrints.pm.
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).

The problem is caused by the fact that, for some reason,
$items->reorder( 'datestamp' );
is not actually sorting the list as it should.

So you should be able to fix the issue easily by adding:

$items->{ids} = [reverse @{$items->{ids} } ];

Or something similar (depending on how you want to sort the list) after the malfunctioning reorder statement in the render_content subroutine .

You will then need to refresh the Meprints pages, and the issue should be solved.

I hope it can be of help!


Michele Morelli
Research Technologies Junior Developer
CoSector - University of London
Senate House, Malet Street, London WC1E 7HU

Direct: 0207 862 8180
Email: mailto:michele.morelli at cosector.com
Web: http://www.cosector.com/research-technologies
[CoSector Blue Black T RGB Horizontal small]

On Sat, Aug 11, 2018, 11:31 MUIZZUDIN BIN KASPOL / PSAS <

muizzudin at upm.edu.my<http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech>> wrote:


> I'm having a problem with MePrints Latest Additions display in user

> profile.


> As example when I have deposited a new record and try to display at

> http://urldaomain/cgi/latest it indicates a new record have been added,

> but when I click on my user profile at http://urldomain/profile/userid,

> the new deposited record is not showing in the latest addition list. It

> seems that the record only shows 10 previous records and not latest records.


> I've tried to disable and uninstall MePrints plugin through EPrints Bazaar

> and re-install the MePrints plugins back, but the problem hasn't been

> solved yet.


> Best Regards,


> Muizzudin

> Librarian,

> Universiti Putra Malaysia.


> *** 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/

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20180820/35783f56/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image003.png
Type: image/png
Size: 11731 bytes
Desc: image003.png
Url : http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20180820/35783f56/attachment-0001.png