[EP-tech] Charts Visualization on IRStats - Abstract Pages - Chrome

Tomasz Neugebauer Tomasz.Neugebauer at concordia.ca
Fri Jul 24 22:05:26 BST 2020


This is just a quick update to let everyone know that I submitted my fix for the issue I described below on eprintsug IRstats2 github.
https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprintsug%2Firstats2%2Fcommit%2Fbbb8653f751d09115912a08ae41636194990cc09&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=%2BSNKFgVP%2BHzqXIzpsJmeZG5goEWRjbtYQ2mm60J%2FI5g%3D&reserved=0
I created a separate branch for this commit (https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprintsug%2Firstats2%2Ftree%2FGoogleChartsLoadv48&data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&sdata=DbSukVLMokumDm1vu64GAB0reFCeSN397utvUUdwXZ4%3D&reserved=0), just to make sure that it gets the proper review - please do review it.
This did fix the issue with charts not showing up intermittently in our repository.
This wasn't just a Chrome issue, it was caused by an outdated way in which the charts were being loaded.
I hope I did all that correctly and it might help others (I did check some other repositories and the charts failing to load was not an issue just on our repository).

Tomasz




From: David R Newman <drn at ecs.soton.ac.uk>
Sent: June 20, 2020 5:38 AM
To: eprints-tech at ecs.soton.ac.uk; Tomasz Neugebauer <Tomasz.Neugebauer at concordia.ca>
Subject: Re: [EP-tech] Charts Visualization on IRStats - Abstract Pages - Chrome




Hi Tomasz,

The eprints (rather than eprintsug) is the one used for generating new releases of IRStats2 on the Bazaar (although it has been a while) but it looks like the eprintsug has be updated by Rory more recently.  I think on balance I would submit a pull request to eprintsug.

We probably need to sort some consensus out on this, as having both versions is unhelpful.  I also have some local fixes that I have made to IRStats2 that I have not had a chance to consider if they are worth pushing back.  Like everything, it is a case of finding the time to sort these sorts of things out and then getting the best-placed people together to organise things.

Regards

David Newman
On 19/06/2020 23:23, Tomasz Neugebauer via Eprints-tech wrote:
I finally figured it out!  That was not an easy one.  The issue is with how the Google Graph libraries are initialized/loaded in IRStats2.
I added explicit load and google.charts.setOnLoadCallback functions every time I need to generate charts, rather than assuming that the Google library is loaded before each new google.visulization call, and that solved the problem.  Charts show up consistently and quickly, and I was able to switch to the more recent version of the Google charts library in the process.  In fact, I had to, because only since version 45 are we allowed to call "load" more than once, which is be the case when we generate visualizations of different types on the same page in the 'more statistics' sections.  I can prepare a pull request on github for this fix, but which version (I saw an IRStats2 on eprints and eprintsug) of the code on GitHub is the one that's best/most recent to make the pull request on?

Tomasz



From: eprints-tech-bounces at ecs.soton.ac.uk<mailto:eprints-tech-bounces at ecs.soton.ac.uk> <eprints-tech-bounces at ecs.soton.ac.uk><mailto:eprints-tech-bounces at ecs.soton.ac.uk> On Behalf Of Tomasz Neugebauer via Eprints-tech
Sent: June 18, 2020 3:59 PM
To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
Subject: Re: [EP-tech] Charts Visualization on IRStats - Abstract Pages - Chrome

Sorry, I provided the wrong line number in the trace, same command, but the one on this line (263):

https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Firstats2%2Fblob%2F74ce563ff855f7ba9702c4cd98532e95a17166a3%2Flib%2Fstatic%2Fjavascript%2Fauto%2F90_irstats2.js%23L263&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=rs9G0Dyv4GOQMXXTU%2F7HieHxAUITjDZto%2FjkGKPgduw%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Firstats2%2Fblob%2F74ce563ff855f7ba9702c4cd98532e95a17166a3%2Flib%2Fstatic%2Fjavascript%2Fauto%2F90_irstats2.js%23L263&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=rs9G0Dyv4GOQMXXTU%2F7HieHxAUITjDZto%2FjkGKPgduw%3D&amp;reserved=0>

the call to new google.visulization.DataTable() inEPJS_Stats_GoogleGraph = Class.create(EPJS_Stats,

Tomasz


From: Tomasz Neugebauer
Sent: June 18, 2020 3:52 PM
To: eprints-tech at ecs.soton.ac.uk<mailto:eprints-tech at ecs.soton.ac.uk>
Subject: Charts Visualization on IRStats - Abstract Pages - Chrome

I've been trying to track down a problem with loading of download summary table visualization on abstract pages and I can't seem to figure it out.
The problem only seems to appear in Google Chrome, on Firefox and Edge all is well.
On Chrome, however, the graph visualizations don't appear on the abstract pages, most of the time.
Clicking on "Reload" will make it appear every now and again, so the issue is intermittent to some extent; but mostly the loader just keeps spinning and it doesn't appear.
I have tried to track down the issue, and as far as I see, the XHR call to getData works fine, and data is returned without problems, and passed to the correct functions.
The problem appears right at this line:

                   var data = new google.visualization.DataTable();

So line 328 in this file: https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Firstats2%2Fblob%2F74ce563ff855f7ba9702c4cd98532e95a17166a3%2Flib%2Fstatic%2Fjavascript%2Fauto%2F90_irstats2.js%23L328&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=3VeAkeGXgm1DPKodFOFsOUP1nM3IpER5nNeHLd1KKUw%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Feprints%2Firstats2%2Fblob%2F74ce563ff855f7ba9702c4cd98532e95a17166a3%2Flib%2Fstatic%2Fjavascript%2Fauto%2F90_irstats2.js%23L328&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=3VeAkeGXgm1DPKodFOFsOUP1nM3IpER5nNeHLd1KKUw%3D&amp;reserved=0>
When I put a "Break" (in the debugger in the browser) on this line, I see that it is reached, and the retrieved data (about downloads) is there in the function, but the browser almost never comes back from this line and reaches no subsequent break points. Sometimes it does come back, reaches the next line, and then stops, and then sometimes, it does keep going to the end and then the graph does display.

I tried disabling the CoreRecommender, as there are some warnings in Chrome about SameSite settings/cookies on that (not sure what that is all about either), in case that was the cause, but it didn't change anything.  I also tried changing how Google Charts / JSAPI is included/loaded, the version number of the library, but nothing seems to fix it.

Any ideas?  Do you display a chart of downloads on abstract pages, and is it working well in Chrome?

Tomasz



________________________________________________
Tomasz Neugebauer
Digital Projects & Systems Development Librarian / Bibliothécaire des Projets Numériques & Développement de Systèmes
Library / Bibliothèque
Concordia University / Université Concordia
Tel. / Tél. 514-848-2424 ext. / poste 7738
Email / courriel: tomasz.neugebauer at concordia.ca<mailto:tomasz.neugebauer at concordia.ca>
https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.concordia.ca%2Ffaculty%2Ftomasz-neugebauer.html&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=HRcFreGqZiTWCq9s4cqBhqW4Fvg2rRgB8h15FFbA10Q%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.concordia.ca%2Ffaculty%2Ftomasz-neugebauer.html&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=HRcFreGqZiTWCq9s4cqBhqW4Fvg2rRgB8h15FFbA10Q%3D&amp;reserved=0>
Mailing address / adresse postale: 1455 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8
Street address / adresse municipale: 1400 De Maisonneuve Blvd. W., LB-540-03, Montreal, Quebec H3G 1M8
library.concordia.ca




*** 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&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=iEvasRky%2BcSr1ah6EBoSEgsYepIXIV9po%2BJyeztk00g%3D&amp;reserved=0

*** EPrints community wiki: https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwiki.eprints.org%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=CdvdDfIixoskpH9FdOkuZq31LfvQQ4bwSxE3dMqC3EU%3D&amp;reserved=0

[https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fipmcdn.avast.com%2Fimages%2Ficons%2Ficon-envelope-tick-green-avg-v1.png&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=zft3FjHXCI4RF1f5IFtmfMllsBMe8%2FYBWyhA7DZrQiU%3D&amp;reserved=0]<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=btMHG0QQ065or1ScJCTxhEVrqtDqmeMjOH7JRxmRvU4%3D&amp;reserved=0>
Virus-free. https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2F&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=WazexSwMG2RLLdhW6b9Dc5fCs20AIcsohP8NtxTxxaU%3D&amp;reserved=0<https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.avg.com%2Femail-signature%3Futm_medium%3Demail%26utm_source%3Dlink%26utm_campaign%3Dsig-email%26utm_content%3Demailclient&amp;data=01%7C01%7Ceprints-tech%40ecs.soton.ac.uk%7C33e5ac1aba4f47ba459f08d830154bb4%7C4a5378f929f44d3ebe89669d03ada9d8%7C0&amp;sdata=btMHG0QQ065or1ScJCTxhEVrqtDqmeMjOH7JRxmRvU4%3D&amp;reserved=0>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mailman.ecs.soton.ac.uk/pipermail/eprints-tech/attachments/20200724/bd650d13/attachment-0001.html 


More information about the Eprints-tech mailing list