After upgrade to 3.9.1 Add an activity or resource not loading

After upgrade to 3.9.1 Add an activity or resource not loading

by Marius S -
Number of replies: 7

Hello,

We have upgraded our from Moodle 3.7.1+ to 3.9.1
However now if you click on Add an activity or resource you just get a popup window with spinning icon and nothing is loaded.

Anyone having this? How can we resolve this problem?

Activity chooser not loading

We have purged all cache - did not help.
We have tried to chose different themes (Classic, Boost)  - did not help.
Enabled debug messages in Moodle - did not show any error messages.
Checked apache error logs, no errors about activity chooser.

If I open Firefox inspect element > Console and the moment I click on Add an activity or resource I get this line: uncaught exception: Object

Uncaught exception: Object


Thanks,
Marius.

Average of ratings: -
In reply to Marius S

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by Howard Miller -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

Check the Network tab in the Firefox debugger. Sometimes that gives a clue

In reply to Marius S

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by Otaku Dude -
Hi,

I get this too in Chrome and Safari. Chromes inspector/console reports:

Failed to load resource: the server responded with a status of 404 (Not Found)
custom.js:198 Uncaught ReferenceError: jQuery is not defined
at custom.js:198
tippyinitiator.js:1 Uncaught ReferenceError: jQuery is not defined

Object
backtrace: "* line 8029 of /lib/moodlelib.php: coding_exception thrown↵* line 136 of /course/classes/local/service/content_item_service.php: call to component_callback_exists()↵* line 81 of /course/classes/local/service/content_item_service.php: call to core_course\local\service\content_item_service->get_content_favourites()↵* line 276 of /course/classes/local/service/content_item_service.php: call to core_course\local\service\content_item_service->get_favourite_content_items_for_user()↵* 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: "↵Error code: codingerror"
errorcode: "codingerror"
link: "http://testmoodle.bedford.ac.uk/"
message: "Coding error detected, it must be fixed by a programmer: Invalid component used in plugin/component_callback():assignsubmission_mahara"
moreinfourl: "https://docs.moodle.org/39/en/error/debug/codingerror"
__proto__: Object

My Moodle install reports no missing php extensions.

Thanks,

Nigel.
In reply to Marius S

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by Marius S -
Hello,

After long reading, testing it seems now everything works. In our case we had a problem with guest user. We disabled Activity chooser and got error about used id=1 in debug mode. I checked database and guest users was missing. So we have enabled guest access and created guest users again, the id was 4xxxx, so using phpmyadmin I have changed that user id from 4xxxx to id 1, disabled guest access, enabled activity chooser and it started working.

Other people reports similar behavior if some plugins are missing from disk: https://tracker.moodle.org/browse/MDL-69079

Marius.
Average of ratings: Useful (2)
In reply to Marius S

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by JD RS -
Thanks for your guidance I followed the procedures and I was successful.
In reply to Marius S

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by Otaku Dude -
Hi,

Thanks, it was the orphaned plugin data in the database causing the problem.

Thank you,
Nige.
Average of ratings: Useful (1)
In reply to Marius S

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by Ezequiel Bértola -

Hi Marius


I have the exact same problem, after upgrading to 3.9.1 and I am going crazy to be able to solve it.

I do not quite understand the process I must do to try to solve it.

Thank you!

In reply to Ezequiel Bértola

Re: After upgrade to 3.9.1 Add an activity or resource not loading

by Ken Task -
Picture of Particularly helpful Moodlers

@Ezequiel Bértola

'exact same problem' should then render debugging info exactly the same.   So turn on debugging + use FireFox console to collect information to share here.   Let's see if it is 'exactly the same' or not.

In 3.9.x the code/behavior for selecting an activity or resource has changed.   Rather than 2 drop down list from which to select, one popup with both activites and resource tools listed from which to select.

So in other posting, op found an in compatible plugin ... how about your site?   All plugins up to date?

You can change the new back to the old by adding a line to your config.php file:


$CFG->modchooserdefault=0;

After making that change might be a good idea to purge caches.

'SoS', Ken