Created on 27 March 2021, about 4 years ago
Updated 28 April 2023, almost 2 years ago

Hi,

This is a user experience report, which doesn't fit easily under any heading - not bugs, but you may want to change the Readme...

I tried to install using Composer and the steps you listed. The module installed fine, but the JSNLOG library was not installed. I think the Composer instructions probably assume in the existence of Bower or another js package manager and that Composer is aware of them. I don't have a js package manager in this dev environment. Possibly relevant is that I am using ddev which provides a docker-based virtual development environment. I don't know if it's possible to get Composer to download directly, maybe from the CDN.

In the end I resorted to downloading jsnlog.min.js by hand and creating and putting it in libraries/jsnlog.

That still gave me an error that the library wasn't available. It turns out that the check for the presence of JSNLOG in checkLibraryFolder, checks that both the .js and min.js are present, and reports a failure if they aren't.

  if (file_exists($dir . '/jsnlog.js') && file_exists($dir . '/jsnlog.min.js')) {

It would probably be sensible to break out into two checks; it turned out that JSNLOG could have been working if I had chosen to the min.js tickbox, despite the error. (I didn't check that properly - maybe checkLibraryFolder returning false stops the code from attaching the library, so even if the library is present, it isn't used.)

Anyway, that brings me to the next problem I found: I use uBlock Origin as an adblocker. It turns out that JSNLOG is blocked. For it to work, you have to unblock it, even if it's local. I think this should be in the Readme.

That might also be why when I was trying to get it running, and chose the CDN version, it wasn't working. Or it may be checkLibraryFolder, or both.

I think the answer to these are probably a Test page, with settings, to expand the checks, and list reasons that it may not be working. And include a test of an error - for example deliberately creating a Javascript error, and having either a special Drupal controller for that error, or checking the watchdog messages for the test error inside the last 2 seconds.

These were teething problems: now that I have it working, it's good; I have it reporting transient js problems in my dev environment. Thank you.

πŸ“Œ Task
Status

Fixed

Version

1.0

Component

Miscellaneous

Created by

πŸ‡¬πŸ‡§United Kingdom Jeff Veit

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024