Problem accessing dropdown such as personal profile since 3.8 (20191118) update

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Michael Hawkins -
Number of replies: 15
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Testers
Hi all,

We have looked into this today and performed various testing scenarios (with both upgrading and with/without the mentioned plugins). These issues don't relate to performing the upgrade itself, but rather existing JavaScript issues within one or more third party plugins are surfacing when those plugins are installed with Moodle 3.8.

In the case of mod_groupformation, the key error is that some JavaScript is not being defined correctly, which is causing an error that prevents other JavaScript executing on the page, such as that which switches between the site admin tabs. I will attempt to contact the plugin maintainer for that plugin today and let them know about the issue (it is also worth mentioning that plugin has not been updated since Moodle 3.5).

For Madhu and others experiencing this issue who do not have mod_groupformation installed, I would suggest some other installed plugin is likely not following the current JS guidelines, and triggering a similar bug. I did also test mod_grouptool, which seemed fine and did not cause the same issue. If you are able to identify the culprit(s), the best course of action would be to contact the relevant plugin maintainer, so they are hopefully able to address the issue and publish a compatible version.

Regarding the search.php URLs ending in #linkusers, #linkcourses etc, those are correct on the relevant admin section, and have just been updated in that way to allow refreshing/navigating back in your browser to that admin page to retain the correct visible section on the page, rather than defaulting back to the base "site administration" tab.

I hope that information is helpful, and you're able to find any remaining sources of the issue soon!

Mick
Average of ratings: Useful (4)
In reply to Michael Hawkins

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Guido Roessling -
Picture of Plugin developers
Thank you for your reply and the analysis, Mick!
My Moodle (and especially JavaScript) skills were only sufficient to pinpoint the culprit (in my case), but not to analyse the reason behind this. As such, could you give a link to information on how one can tell whether "some JavaScript is not being defined correctly"? That is, are there some "telltale sign" or other indications that would let users tell if the JavaScript in plugin X should be OK or might be the case of error?
Best regards,

Guido
In reply to Guido Roessling

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Michael Hawkins -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Testers
Hi Guido,

Not a problem! It's a tricky one to answer, because there could be many different causes. In general, checking the browser console for any errors is a good place to start, then following those to determine the source (and if you can/need to, analysing that to determine why it's an issue). In this case, following the error in the browser console led to a JavaScript file which was calling a function immediately after it was initialised, rather than just defining it for later use in the correct place (there is an example of how it should have been defined in the JavaScript modules docs). We were able to confirm that was the issue by updating the code locally, then confirming the issues on the page were fixed. A slightly less complicated way  to confirm the suspected file was the culprit, particularly since the file was minified (not easily human readable), was to first identify the suspected cause, then simply remove that JavaScript from the file briefly, and confirm that also stopped the bug appearing on the page.

Note: We were testing and modifying code on local development servers, and I'd advise only modifying files to troubleshoot issues such as this in a non-production  environment, so live users aren't affected and to avoid risking any other damage/data loss of production data. In the upgrade overview docs, we recommend performing a test upgrade on a copy of your site before going ahead with upgrading your main site (in case any issues arise), so using that separate copy of your site could also be an option (assuming it does not modify production data).
In reply to Michael Hawkins

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Madhu Avasarala -
Just an added note on this issue: When the cachejs is set to No in the admin settings then the problem goes away completely.
Average of ratings: Useful (2)
In reply to Madhu Avasarala

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Martin Meadows -
Thanks Madhu, for this tip. After struggling with this for the past two weeks, deleting plugins and downgrading php from 7.4 to 7.3, I turned off the cachejs and, hallelujah!, my dropdown menus started working again.

BUT, is this an ideal solution? The default is to have this turned on for improved page loading performance. Won't having it turned off make our installations more sluggish?
Average of ratings: Useful (1)
In reply to Martin Meadows

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Michael Hawkins -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Testers
Hi Martin,

Does the problem return if you re-enable cachejs? I'm wondering whether the issue was that your JS cache needed purging or something along those lines.
Average of ratings: Useful (1)
In reply to Michael Hawkins

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Martin Meadows -

Hi Michael, 

Yes, the problem returns as soon as I re-enable cachejs. I've been upgrading/downgrading between 3.7 and 3.8 branches, deleting additional plugins both pre and post upgrade to try to find the source of the problem. After every deletion of a plugin, I purge all caches, but the issue remains. 

This is mostly a test site, but there is one course that is in use and a couple from which I need to extract important data. I have whittled things down to Questionnaire, Reader and the Poodll suite of plugins but these are, for me, essentials and I'm not ready to delete them just yet. 

****************************
<git status> says:

Your branch is up to date with 'origin/MOODLE_38_STABLE'.

Untracked files:
  (use "git add <file>..." to include in what will be committed)

blocks/glossary_export_to_quiz/
blocks/readerview/
filter/generico/
filter/poodll/
filter/videoeasy/
lib/editor/atto/plugins/cloudpoodll/
lib/editor/atto/plugins/generico/
lib/editor/atto/plugins/poodll/
lib/editor/tinymce/plugins/poodll/
mod/assign/feedback/poodll/
mod/assign/submission/onlinepoodll/
mod/assignment/type/poodllonline/
mod/data/field/poodll/
mod/hvp/
mod/questionnaire/
mod/readaloud/
mod/reader/
php_errors.log
question/type/cloudpoodll/
question/type/essayautograde/
question/type/gapfill/
question/type/ordering/
question/type/poodllrecording/
repository/poodll/
theme/fordson/

***********************

MY THOUGHTS:

  • I have reader running without problems on a different 3.8 installation. 
  • fordson and glossary_export_to_quiz are 3.8 release versions so should be OK
  • the poodll/generico suite of plugins are working fine on Poodll-Creator Justin Hunt's 3.8 test site. He also has admin access to my site but didn't find anything to suggest where the problem lies ...
  • I can't delete questionnaire yet to see if it might be the cause, but it tends to be a well-maintained plugin ....


So, that's where I am. I need to find a creative new perspective.    


In reply to Martin Meadows

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Guido Roessling -
Picture of Plugin developers
Note: you do not really have to delete the plugins per se, as in "purge the database of all files". What I did instead was "move them out of the way" and check if the problems persisted when they were gone (but still had all their data in the database), and if the problem re-appeared after moving the sources back to the right spot and running upgrade. (I think running upgrade is not necessarily).
This will take you a few minutes, but you should be able to pinpoint the problem more easily, and not risk "losing questionnaires" (although they will be unavailable or shown an error if somebody accesses them while you work on it).
We have Fordson and questionnaire installation without problem, so I assume that those are not the problematic plugins.
Average of ratings: Useful (1)
In reply to Martin Meadows

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Adam Jenkins -
Picture of Plugin developers

I have been able to replicate this issue as well (it wasn't difficult).

There also exists a tracker item for this: https://tracker.moodle.org/browse/MDL-67358

I'll try to post more when I know more, but for the moment, it appears to happen with a variety of plugins and at different levels. For example a block will affect a dashboard page with that block on it more than say a quiz question type. (which is logical).

Average of ratings: Useful (2)
In reply to Michael Hawkins

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Madhu Avasarala -
Hello Micahel,
Thanks for your insightful explanation. I turned on the console and could see some errors in javascript. After uninstalling the extremely important plugin block_configurable_reports, the problem completely disappeared. So in my case it was this plugin causing some issues. I shall post a bug report on the tracker of that plugin but if you have some influence on that plugin development team I would be grateful if you can exercise it since this plugin is as important as the core. Thanks.
Average of ratings: Useful (1)
In reply to Madhu Avasarala

Re: Problem accessing dropdown such as personal profile since 3.8 (20191118) update

by Michael Hawkins -
Picture of Core developers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Testers
No worries, thanks Madhu. That plugin appears to be maintained by some HQ developers, so I will follow up with them to ensure they have seen your report in Tracker.
In reply to Michael Hawkins

Ri: Re: Problem accessing dropdown since 3.8 (20191118) update

by Davide Rossi -

Hi all,

I just upgraded to Moodle 3.8+ (Build: 20191122).

Dropdown menu no longer work when I turn editing on.

In my case Collapsed Topics seems causing some issues, but I am not sure because
at the moment the problem is unclear and not constant.

Thank you in advance

In reply to Davide Rossi

Re: Ri: Re: Problem accessing dropdown since 3.8 (20191118) update

by Guido Roessling -
Picture of Plugin developers

Hi Davide,

please see the post by Michael Hawkins above (https://moodle.org/mod/forum/discuss.php?d=393570#p1587351 for some information on how to find out what the troublesome plugin is. I do not recommend "my approach" unless you cannot find a better way to get this figured out...

In our case, the plugin used an incorrect access to tether (amd/src/tether.js in this case), although tether was already provided by theme/boost/amd/src/tether.js. If you have ssh access to your system (and assuming it is Linux-based), you may want to run this command: find . -name tether.js (in the Moodle installation directory) and look for where tether.js is used besides theme/boost/amd/src/tether.js . Those plugins would then go on my list of monitoring if they are the culprit; in my case, I moved them out of the Moodle file system (do not do a "real delete", as this will also delete all DB records....), ran upgrade to be on the safe side, and checked if the system now worked.

Best regards and good luck,

Guido

In reply to Guido Roessling

Ri: Re: Ri: Re: Problem accessing dropdown since 3.8 (20191118) update

by Davide Rossi -
Thanks Guido for the answer.
I searched tether.js. The only occurrence is in the theme Boost.
I checked the browser console for any errors and I founded an error with responsivevoice.js, a Text-to-Speech code.
For now I deleted it (even though it was very useful in my courses) and everything seem to work.
Thanks again,
Davide
In reply to Davide Rossi

Re: Ri: Re: Ri: Re: Problem accessing dropdown since 3.8 (20191118) update

by Guido Roessling -
Picture of Plugin developers
I am glad I could help a bit, even if the plugin in your case was something different...
Best regards,

Guido