EPrints Technical Mailing List Archive

Message: #09204


< Previous (by date) | Next (by date) > | < Previous (in thread) | Next (in thread) > | Messages - Most Recent First | Threads - Most Recent First

Re: [EP-tech] document.observe is not a function Error in EPrints3.4.4


CAUTION: This e-mail originated outside the University of Southampton.
Thank David R. Newman
This works seamlessly after updating with the solution from the Github issue. Now the statistics are back up

__________________________________________________________________________________
MATILUKO, Opeyemi Emmanuel
OPMat(R)


On Friday, 6 January 2023 at 10:03:23 GMT+1, <eprints-tech-request@ecs.soton.ac.uk> wrote:


Send Eprints-tech mailing list submissions to

To subscribe or unsubscribe via the World Wide Web, visit
or, via email, send a message with subject or body 'help' to

You can reach the person managing the list at

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Eprints-tech digest..."


Today's Topics:

  1. Re: document.observe is not a function Error in EPrints3.4.4
      (David R Newman)
  2. Re: Ask about open access and full text on irstats    overview
      (David R Newman)


----------------------------------------------------------------------

Message: 1
Date: Fri, 6 Jan 2023 08:47:54 +0000
From: David R Newman <drn@ecs.soton.ac.uk>
Subject: Re: [EP-tech] document.observe is not a function Error in
    EPrints3.4.4
To: <eprints-tech@ecs.soton.ac.uk>, "MATILUKO, Opeyemi Emmanuel"
Message-ID:
    <EMEW3|4cfeae946d4ef013fac0cac8e81f2281z058lw03drn|ecs.soton.ac.uk|9c1b6fb7-f8d3-0534-e003-4588cbe5644a@ecs.soton.ac.uk>
   
Content-Type: text/plain; charset="utf-8"

Hi,

I think someone also reported a similar issue on this mailing list
recently.? If you add the prototypejs ingredient to your
EPRINTS_PATH/flavours/pub_lib/inc file, as well as reloading the web
server, if you initially loaded your EPrints repository in the same web
browser without adding prototypejs to your inc file, the _javascript_
(/_javascript_/auto-3.4.4.js) will be cached client-side. In most browser
you can clear this client-side cache with a hard refresh using the key
combination Ctrl+Shift+R. (You could also test loading your EPrints
repository again in private/incognito mode or in a different web browser).

If this does not work? It is worth loading in your web browser the
auto-generated _javascript_ file itself, which can be found by viewing the
source for the page and finding it in the page's <head>.- Check the
_javascript_ code displayed for the string "20_prototype.js".? If this is
not present, also try a hard refresh (Ctrl+Shift+R)? of the _javascript_
'page' and search for the string "20_prototype.js" again.? If you still
cannot find it your may have some other issue preventing the _javascript_
from being updated.

3.4.4 introduced a timestamp to the _javascript_
(/_javascript_/auto-3.4.4.js) and CSS (/style/auto-3.4.4.css)
auto-generated file links, which are the amalgamation of various
_javascript_ or CSS files across the EPrints codebase's _javascript_/auto/
or style/auto/ directories.? E.g.

/_javascript_/auto-3.4.4.js?1664898850

However, the code that determines whether the link for auto-generated
_javascript_ file needs to update its timestamp, so web browsers will drop
their client cache automatically, does not take into account that new
_javascript_ files might be added by virtue of including a new
ingredient.? The timestamp is set based on the latest time any included
_javascript_ file was modified.? A newly added ingredient, may not have
any _javascript_ files that have been modified since the current timestamp
being used.? Therefore, the client cache will not be cleared despite the
auto-generated _javascript_ file having? changed to include extra
_javascript_ files. I have added a GitHub issue to investigate and fix this:


Regards

David Newman

On 06/01/2023 5:49 am, MATILUKO, Opeyemi Emmanuel via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
>
>    Hi
>
>    I recently upgraded EPrints to version 3.4.4 and the statistics
>    stopped working. On inspection, I see 2 error popping up and the
>    errors are;
>
>    1. Uncaught ReferenceError: Class is not defined in
>    auto-3.4.4.js:283:18
>    The line contains var EPJS_Menus = Class.create({...
>
>    2. Uncaught TypeError: document.observe is not a function
>    This error is from the line
>    document.observe("dom:loaded",function(){
>    ? ? ? ? new EPJS_Stats_Table ({ 'context': {
>    ? ? ? ? ? ? 'range':'_ALL_',
>    ? ? ? ? ? ? 'datatype':'downloads'
>    ? ? ? ? ? ? },
>    ? ? ? ? ? ? 'options': {
>    ? ? ? ? ? ? 'container_id': 'top-authors', 'top': 'authors',
>    'view': 'Table', 'limit': '10', 'title': 'Top Authors'
>    ? ? ? ? ? ? }
>    ? ? ? ? });
>    ? ? });
>
>    I have added ingredients/prototypejs as a dependency
>    What can be the issue? and what is the possible solution?
>    Thanks
>
>
-------------- next part --------------
An HTML attachment was scrubbed...

------------------------------

Message: 2
Date: Fri, 6 Jan 2023 09:00:22 +0000
From: David R Newman <drn@ecs.soton.ac.uk>
Subject: Re: [EP-tech] Ask about open access and full text on irstats
    overview
To: <eprints-tech@ecs.soton.ac.uk>, "Agung Prasetyo W."
Message-ID:
    <EMEW3|23fc915f3fa71ab924daf43868c0fe09z0590w03drn|ecs.soton.ac.uk|f7d81811-7a8a-3b76-4efa-ff5089b507ae@ecs.soton.ac.uk>
   
Content-Type: text/plain; charset="utf-8"

Hi Agung,

Full-text is based on how many EPrints in the live archive have at least
one file uploaded.? There is not a requirement for the type of file
uploaded. Open access is based on whether at least one uploaded file for
an item is publicly downloadable.? Looking at the code, the Open access
percentage is based on all live items whether they have any uploaded
files.? So an item with no uploaded files would be considered not open
access.

Based on your percentages, all your live items have at least one file
uploaded but 1% or items do not have any files that are publicly
downloadable.

Regards

David Newman

On 06/01/2023 6:37 am, Agung Prasetyo W. via Eprints-tech wrote:
> *CAUTION:* This e-mail originated outside the University of Southampton.
> Hi,
>
> Can anyone provide an explanation of the information or differences
> between full text and open access on IRStats, based on the screenshots
> I show here.
>
> image.png
>
> Thank you.
>
> Regards,
> Agung Prasetyo Wibowo
>
-------------- next part --------------
An HTML attachment was scrubbed...
-------------- next part --------------
A non-text attachment was scrubbed...
Name: image.png
Type: image/png
Size: 43251 bytes
Desc: not available

------------------------------

_______________________________________________
Eprints-tech mailing list


End of Eprints-tech Digest, Vol 172, Issue 7
********************************************