[EP-tech] IRStats2: Slow in Chrome?

David R Newman drn at ecs.soton.ac.uk
Thu Oct 8 09:32:07 BST 2020


Hi James,

Yes, I have noticed this as well.  I fixed by change the following block 
of code in EPrints/Plugin/Stats/View.pm

125                 if( document.loaded )
126                       new EPJS_Stats_$js_class( { 'context': 
$json_context, 'options': $view_options } );
127                 else
128 document.observe("dom:loaded",function(){
129                                   new EPJS_Stats_$js_class( { 
'context': $json_context, 'options': $view_options } );
130                         });

to:

      125            google.setOnLoadCallback(drawChart_$id);
      126            function drawChart_$id()
      127            {
      128                    new EPJS_Stats_$js_class( { 'context': 
$json_context, 'options': $view_options } );
      129
      130            }

I also made a similar change in EPrints/Plugin/Stats/View/KeyFigures.pm 
as well.  If you have download stats boxes on abstract/summary pages you 
will also need to make a similar change to one of the phrases in 
lang/en/phrases/irstats2.xml.

Regards

David Newman
On 08/10/2020 08:51, James Kerwin via Eprints-tech wrote:
> Hi All,
>
> I updated IRStats2 to the most recent version back in May (I think it 
> was 1.01 to 1.1) from the Bazaar.
>
> All seemed well until this week when I looked and realised there was 
> no data. since the upgrade. It turns out it was because of the 
> permissions and ownership of the process_stats file which is supposed 
> to run frequently to process the stats and I assume update the 
> irstats2_ tables in the database.
>
> After the upgrade the script was owned by www-data (whatever it's 
> called) and the "eprints" user didn't have permission to execute it. 
> Due to the "no output" options set in cron I wasn't getting any info.
>
> It was my fault for not being thorough enough and it's all sorted now, 
> but I thought I would offer this as a warning to anybody who upgrades 
> and doesn't know to check this sort of thing.
>
> Also the IRStats2 pages stay "loading" forever on Chrome, but load 
> almost immediately on FireFox. Any idea what causes this?
>
> Thanks,
> James
>
> *** Options: http://mailman.ecs.soton.ac.uk/mailman/listinfo/eprints-tech
> *** Archive: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.eprints.org%2Ftech.php%2F&data=01%7C01%7C%7C4c990ac3b1fe4846a9f408d86b64a51c%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=%2B7sBTD0Puqa5zljcuGi8oij%2Fb8YcOUtttLhsy4Te8RA%3D&reserved=0
> *** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&data=01%7C01%7C%7C4c990ac3b1fe4846a9f408d86b64a51c%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=PKKfcwddT8HlDqPdO%2F7892f9SUYvj61KIDuPTtCVIEo%3D&reserved=0


-- 
This email has been checked for viruses by AVG.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.avg.com%2F&data=01%7C01%7C%7C4c990ac3b1fe4846a9f408d86b64a51c%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=rVDjuS6oLaFOf9AeBjIfIpfsY%2F%2BoREINjiqsTKTCX1g%3D&reserved=0
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20201008/170b0b48/attachment.html 


More information about the Eprints-tech mailing list