Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Craig Mackey -
Number of replies: 21

I have a dilema.

I just upgraded my localhost test server from Moodle 3.6 to Moodle 3.9+ (Build: 20200626) and the activity chooser just hangs on a little wheel of death (see image below). This happens irrespective of theme, browser or platform (android, ios or win 10 PC).

So out of interest I created a clean install of 3.9+ (Build: 20200626) and all appears normal.

Ubuntu 18.04 server, PHP 7.2.31, Postgres 12.3

Any ideas how I can rescue my test server?

Thanks in advance.
Craig.


Image 1 - Activity Chooser hangs at this point.


Image 2 - Activity Chooser OK in a clean install - same environment

Average of ratings: Useful (1)
In reply to Craig Mackey

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
Same problem here: Activity chooser works on one test server, doesn't work on another (Broken A), and doesn't work on production site (Broken B). Main specs for all three sites are these:
Moodle 3.9+ build 20200626
Mariadb 10.3.23
php 7.2.24.0.0.18.04.6
everything else marked as OK.

Environment differences between the sites:
Broken sites A and B both have php_extension xsl for plugin Import Word file
Broken site B only has php_extnesion xsl for Book / Book tool / Microsoft Word file Import/Export

Theme for working site: Fordson
Theme for broken site A: Boost
Theme for broken site B: Fordson

Broken site B also has one orphaned (not on disk) plugin (assignment_onlineaudio)
Turning off activity chooser in Broken site B causes pages to not load with error:
Coding error detected, it must be fixed by a programmer: Invalid component used in plugin/component_callback():assignment_onlineaudio

I am now stuck with not being able to use any conventional method to add activities or resources. (I have been using the Sharing Cart plugin to copy similar activities from other courses and then editing those activities in place).

I have tried restarting both Mariadb and Nginx and rebooting the server to no avail.

Any help would be greatly appreciated.
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Simon Brock -
We have same problem activity chooser broken, if we change course preferences > Enable activity chooser > un tick it will produce an error on the page

Debug info: SELECT id FROM {user} WHERE id = ? AND deleted = ?
[array (
0 => '1515',
1 => 0,
)]
Error code: invaliduser

Stack trace:
line 1599 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
line 1575 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
line 6496 of /lib/accesslib.php: call to moodle_database->get_record()
line 108 of /course/classes/local/service/content_item_service.php: call to context_user::instance()
line 277 of /course/classes/local/service/content_item_service.php: call to core_course\local\service\content_item_service->get_recommendations()
line 391 of /course/format/singleactivity/lib.php: call to core_course\local\service\content_item_service->get_content_items_for_user_in_course()
line 462 of /course/format/singleactivity/lib.php: call to format_singleactivity->activity_has_subtypes()
line 1033 of /lib/pagelib.php: call to format_singleactivity->page_set_course()
line 2815 of /lib/moodlelib.php: call to moodle_page->set_course()
line 58 of /course/view.php: call to require_login()

with activity chooser enabled we get the spinning circle if I open console i get

first.js:111 Uncaught (in promise) Object
first.js:111 Uncaught (in promise) {message: "Invalid user", errorcode: "invaliduser", link: "sitename", moreinfourl: "http://docs.moodle.org/39/en/error/moodle/invaliduser"}
m @ first.js:111
g @ first.js:111
Promise.then (async)
m @ first.js:111
f @ first.js:111
Promise.then (async)
m @ first.js:111
f @ first.js:111
(anonymous) @ first.js:111
(anonymous) @ first.js:111
(anonymous) @ first.js:111
Average of ratings: Useful (1)
In reply to Simon Brock

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Andrew D -

Getting an almost identical error here after updating recently. Only difference is mine was triggered when I attempted to "turn editing on" for a page. 

It is possible it's a different error of course, but it seems almost identical and within 24 hours, so I thought worth posting in this thread as I suspect they are related.

The error in my case is:

Invalid user

Debug info: SELECT id FROM {user} WHERE id = ? AND deleted = ?

[array (
0 => '1',
1 => 0,
)]
Error code: invaliduser

Stack trace:
  • line 1599 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
  • line 1575 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
  • line 6496 of /lib/accesslib.php: call to moodle_database->get_record()
  • line 108 of /course/classes/local/service/content_item_service.php: call to context_user::instance()
  • line 277 of /course/classes/local/service/content_item_service.php: call to core_course\local\service\content_item_service->get_recommendations()
  • line 311 of /course/renderer.php: call to core_course\local\service\content_item_service->get_content_items_for_user_in_course()
  • line 865 of /course/format/renderer.php: call to core_course_renderer->course_section_add_cm_control()
  • line 57 of /course/format/topics/format.php: call to format_section_renderer_base->print_multiple_section_page()
  • line 290 of /course/view.php: call to require()

In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
Broken site A also breaks with a similar "Coding error detected" when "Enable activity chooser" is unchecked.
Working site does not break and shows the expected drop down menus.
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
I reinstalled the missing plugin (Assignment submissions: Online audio recording) on Broken site A, but the site continues to behave in the same fashion: the new activity chooser hangs, and unchecking "Administration > Appearance > AJAX and Javascript > Activity chooser default" causes pages to stop rendering.
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
Reinstalled the missing and seemingly problematic plugin on broken site A to no avail.
I assume deleting all reference to the broken plugin would solve things, but I have no idea how to do that. I don't want to uninstall from Broken site A because I could of submissions depend on the plugin.
For Broken Site B, I'm willing to delete all references but do not know how to do that with the "missing from disk" situation.
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
The phenomena persist in build 20200704.
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
Uninstalling Assignment 2.2 (mod_assignment) from Site Administration > Plugins > Plugins overview cleared up the problem in Broken site A.
Average of ratings: Useful (1)
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Doug E. Wray -
I worked in broken site B as well.
In reply to Doug E. Wray

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Same here sad
Going for your suggestion, I deleted assignment 2.2 too, but without it doesn't resolve the problem with the activity chooser.
I have another site with a working activity chooser and an installed, disabled assignment 2.2

I comment on the tracker issue
In reply to koen roggemans

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Matthias Giger -
Picture of Particularly helpful Moodlers
Same problem here.
I'm still trying to figure out, what's going on.
On the same server there is a second installation which works like a charm.
In reply to Matthias Giger

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Matthias Giger -
Picture of Particularly helpful Moodlers
Ok, I did some more testing.
Setting of caching of JavaScript in the config.php ($CFG->cachejs = false;) revealed (Browser console) that in my case the culprit was a plugin missing from disc:
https://moodle.org/plugins/pluginversions.php?plugin=assignsubmission_geogebra
My guess is that any missing plugin who could potentially show up in the activity chooser will cause the same problem.
In reply to Matthias Giger

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by koen roggemans -
Picture of Core developers Picture of Documentation writers Picture of Moodle HQ Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Translators
Please comment new information on https://tracker.moodle.org/browse/MDL-69076 which seems to be the first report of this problem.
In reply to koen roggemans

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Matthias Giger -
Picture of Particularly helpful Moodlers
I have added a short comment. I hope this will help to track down the issue and make Moodle 3.9 even more stable. Compared to the first release of 3.8 the current version was very easy to upgrade.
Average of ratings: Useful (1)
In reply to Craig Mackey

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Ronnie Zeiller -

Exactly the same here.
Since version 3.9 
Upgrade to 3.9.1 did not help.

Error seems to come from Secure Exam Browser

Invalid component used in plugin/component_callback():quizaccess_safebrowser

Do not know how to turn this (new in 3.9?) feature off, as we do not need it!

Hoping the best,

Ronnie

In reply to Ronnie Zeiller

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Adam Brożyński -

Cause:

  • quizaccess_safebrowser was replaced by quizaccess_seb

Solution:

  1. Open moodle database in phpmyadmin
  2. Go to prefix_config_plugins table where prefix is your prefix for moodle tables
  3. Remove row with quizaccess_safebrowser in plugin column.
  4. Go to Site administration→Developement→Purge caches and Purge all caches

Regards,
Adam

Average of ratings: Useful (1)
In reply to Adam Brożyński

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Pasadena Bible College -

This solution worked for me.

Moodle 3.9.1+ (Build: 20200723) | Version 2020061501.03 

In reply to Adam Brożyński

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Ronnie Zeiller -
Hi Adam,
tried it but it did not help.
But the error message in javascript console changed to:
{message: "Invalid user", errorcode: "invaliduser", backtrace: "* line 1599 of /lib/dml/moodle_database.php: dml_m…: call to external_api::call_external_function()↵", link: "https://moodle.waldorf-campus-wien.at/", moreinfourl: "https://docs.moodle.org/39/en/error/moodle/invaliduser", …}backtrace: "* line 1599 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown↵* line 1575 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()↵* line 6496 of /lib/accesslib.php: call to moodle_database->get_record()↵* line 108 of /course/classes/local/service/content_item_service.php: call to context_user::instance()↵* line 277 of /course/classes/local/service/content_item_service.php: call to core_course\local\service\content_item_service->get_recommendations()↵* line 4287 of /course/externallib.php: call to core_course\local\service\content_item_service->get_content_items_for_user_in_course()↵* line 261 of /lib/externallib.php: call to core_course_external::get_course_content_items()↵* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()↵"debuginfo: "SELECT id FROM {user} WHERE id = ? AND deleted = ?↵[array (↵ 0 => '1',↵ 1 => 0,↵)]↵Error code: invaliduser"errorcode: "invaliduser"link: "https://moodle.domain.tld/"message: "Invalid user"moreinfourl: "https://docs.moodle.org/39/en/error/moodle/invaliduser"__proto__: Object

Any more ideas?

Thank You,
best regards
Ronnie
In reply to Ronnie Zeiller

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Ken Task -
Picture of Particularly helpful Moodlers

https://moodle.waldorf-campus-wien.at/
auto forwards to another host:
https://moodle3.waldorf-campus-wien.at/

same IP address in DNS ...

What is url in config.php?

'SoS', Ken


In reply to Ken Task

Re: Moodle 3.9+ (Build: 20200626) -Activity Chooser Hangs

by Ronnie Zeiller -
Hi Ken,
thank you for follow up.

url moodle.waldorf..... was the firstly updated version to 3.9 which did not work

The new url is moodle3.waldorf.... which is now a weekly built version 3.9.1+
(The different urls have been just for safety reasons to keep the database and moodle-data directoriy for the different versions)


With this version Moodle 3.9.1+ (Build: 20200807) I got it running again and the Activity Chooser is also working again!

So this is solved for me,
thank you all,

Ronnie

P.S.: for all with similar "invalid user" - error, which I mentioned above: The reason for this error message was the deleted "Guest User"!
Discussed here: https://tracker.moodle.org/browse/MDL-69076
(In my moodle database was for username=guest => deleted=1 which I had to correct to deleted=0)