Dear ALL:
I have a server update to Moodle 3.9.1+ (Build: 20200730) recently. After this upgrade, some old Plugins of module Assignment 2.2 became deprecated and unavailable. In particular this plugin assignment_random.
So when I click on Activity Chooser with the Ajax enable, I get this:
Coding error detected, it must be fixed by a programmer: Invalid component used in plugin/component_callback():assignment_random
And by disabling the Ajax of Activity Chooser, I got:
Debug info: Error code: codingerror Stack trace: line 8033 of /lib/moodlelib.php: coding_exception thrown line 141 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 281 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 311 of /course/renderer.php: call to core_course\local\service\content_item_service->get_content_items_for_user_in_course() line 149 of /blocks/social_activities/block_social_activities.php: call to core_course_renderer->course_section_add_cm_control() line 766 of /blocks/moodleblock.class.php: call to block_social_activities->get_content() line 235 of /blocks/moodleblock.class.php: call to block_list->formatted_contents() line 1181 of /lib/blocklib.php: call to block_base->get_content_for_output() line 1233 of /lib/blocklib.php: call to block_manager->create_block_contents() line 374 of /lib/blocklib.php: call to block_manager->ensure_content_created() line 3966 of /lib/outputrenderers.php: call to block_manager->region_has_content() line 29 of /theme/classic/layout/columns.php: call to core_renderer->blocks() line 1374 of /lib/outputrenderers.php: call to include() line 1304 of /lib/outputrenderers.php: call to core_renderer->render_page_layout() line 244 of /course/view.php: call to core_renderer->header()
So then I tried this:
- I tried to create a new course with any plugin, or legacy file.
- I tried to google it, and search this error here: https://moodle.org/mod/forum/search.php?search=plugin%2Fcomponent_callback&id=5&perpage=10&page=1 :
- I tried to remove, uninstall and disable the Plugins of the module Assignment 2.2, but they are still showing as "Additional Missing from disk!", even after many run the moodle update.
- I have purged *ALL* the caches on the page mdl/admin/purgecaches.php (Site administration / Development / Purge caches)
- I have purged *ALL* the plugins by clicking on *ALL* caches on Site administration / Plugins / Caching / Configuration
- I clicked on Clean the Theme Caches on Site administration/ Appearance / Themes/ Theme selector
- I also have tried to delete manually the all content on trashdir and cachestore_file/
rm -rf /var/moodledata/cache/cachestore_file/*
rm -rf /var/moodledata/trashdir/*
- I tried to find some file of assignment_random, there is no file with this pattern:
find /mdl/ -name "*assignment_random*" -print
But none of those attempts solved the error.
The only thing that partially solved my problem is to comment the lines 8032-8034 of the file *lib/moodlelib.php*:
/* if (empty($dir)){ throw new coding_exception('Invalid component used in plugin/component_callback():' . $component);So finally, I was able to load the Activity Chooser, and create a new Assignment. And afterwards, I uncomment the lines and the error isn't showing to me using my profile.
} */
But!, the problem still does not disappear for the others admin or manager profiles, I had to do the same thing for the other teachers, manager and tutors by connecting on their profile and comment the server code.
There is some way to solve this to all my profiles of Manager Course, and even for the next manager courses?
Thanks for your attention and for any help.
Sincerely,
Patrick Terrematte