learnweb / moodle-mod_collabora

:memo: :globe_with_meridians: An activity for live document editing in Moodle, powered by Collabora Online
GNU General Public License v3.0
9 stars 8 forks source link

Adding deleting several activities causes errors #40

Closed abkoch closed 1 year ago

abkoch commented 1 year ago

Dear developers,

if "mod_collabora" is enabled in Moodle 4.1.4 several activities e.g. "Feedback" cause an error after clicking on "Save and display":

Fehler in der Kodierung gefunden, den nur Programmierer/innen korrigieren können: The theme has already been set up for this page ready for output. Therefore, you can no longer change the theme, or anything that might affect what the current theme is, for example, the course.

Weitere Informationen über diesen Fehler

Debug-Info:  Stack trace when the theme was set up: <ul style="text-align: left" data-rel="backtrace"><li>line 1972 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()</li><li>line 214 of /mod/collabora/lib.php: call to bootstrap_renderer->__call()</li><li>line 861 of /lib/modinfolib.php: call to collabora_get_coursemodule_info()</li><li>line 683 of /lib/modinfolib.php: call to course_modinfo::get_array_of_activities()</li><li>line 652 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()</li><li>line 478 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()</li><li>line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()</li><li>line 2556 of /lib/modinfolib.php: call to course_modinfo::instance()</li><li>line 2630 of /lib/modinfolib.php: call to get_fast_modinfo()</li><li>line 32 of /mod/feedback/view.php: call to get_course_and_cm_from_cmid()</li></ul>
Error code: codingerror×Diese Systemnachricht ablehnen
Stack trace: 
line 2076 of /lib/pagelib.php: coding_exception thrown
line 1145 of /lib/pagelib.php: call to moodle_page->ensure_theme_not_set()
line 1228 of /lib/pagelib.php: call to moodle_page->set_course()
line 2860 of /lib/moodlelib.php: call to moodle_page->set_cm()
line 3206 of /lib/moodlelib.php: call to require_login()
line 33 of /mod/feedback/view.php: call to require_course_login()
×Diese Systemnachricht ablehnen
Ausgabepuffer:  <div class="notifytiny debuggingmessage" data-rel="debugging">Coding problem: $PAGE->context was not set. You may have forgotten to call require_login() or $PAGE->set_context(). The page may not display correctly as a result<ul style="text-align: left" data-rel="backtrace"><li>line 567 of /lib/pagelib.php: call to debugging()</li><li>line 1696 of /lib/pagelib.php: call to moodle_page->magic_get_context()</li><li>line 1972 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()</li><li>line 214 of /mod/collabora/lib.php: call to bootstrap_renderer->__call()</li><li>line 861 of /lib/modinfolib.php: call to collabora_get_coursemodule_info()</li><li>line 683 of /lib/modinfolib.php: call to course_modinfo::get_array_of_activities()</li><li>line 652 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()</li><li>line 478 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()</li><li>line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()</li><li>line 2556 of /lib/modinfolib.php: call to course_modinfo::instance()</li><li>line 2630 of /lib/modinfolib.php: call to get_fast_modinfo()</li><li>line 32 of /mod/feedback/view.php: call to get_course_and_cm_from_cmid()</li></ul></div>

When deleting an activity the following error occurs from time to tome:

codingerror
Fehler in der Kodierung gefunden, den nur Programmierer/innen korrigieren können: $PAGE-&gt;context was not set. You may have forgotten to call require_login() or $PAGE-&gt;set_context()
Datei:  /lib/pagelib.php
Zeile:  562
Stack trace: 
Error code: codingerror
* line 562 of /lib/pagelib.php: coding_exception thrown
* line 1696 of /lib/pagelib.php: call to moodle_page->magic_get_context()
* line 1972 of /lib/setuplib.php: call to moodle_page->initialise_theme_and_output()
* line 214 of /mod/collabora/lib.php: call to bootstrap_renderer->__call()
* line 861 of /lib/modinfolib.php: call to collabora_get_coursemodule_info()
* line 683 of /lib/modinfolib.php: call to course_modinfo::get_array_of_activities()
* line 652 of /lib/modinfolib.php: call to course_modinfo::inner_build_course_cache()
* line 478 of /lib/modinfolib.php: call to course_modinfo::build_course_cache()
* line 436 of /lib/modinfolib.php: call to course_modinfo->__construct()
* line 2556 of /lib/modinfolib.php: call to course_modinfo::instance()
* line 2630 of /lib/modinfolib.php: call to get_fast_modinfo()
* line 3537 of /course/externallib.php: call to get_course_and_cm_from_cmid()
* line 261 of /lib/externallib.php: call to core_course_external::edit_module()
* line 81 of /lib/ajax/service.php: call to external_api::call_external_function()

If "mod_collabora" is disabled the errors don't occur.

Best regards Andreas

grabs commented 1 year ago

Hi Andreas,

I am sorry to hear that. I tried to reproduce this but none of these errors occurred to me. Can you provide some steps to reproduce this behavior? Also what version of collabora do you use? Do you have some non core course format or theme installed? Thank you very much!

Best regards Andreas

abkoch commented 1 year ago

Hi Andreas,

thanks for your immediate reply.

Moodle version: 4.1.4 (Build: 20230612)

Collabora Version: v4.2-r2 (2023-05-24) 2023052400

Themes installed (core and non-core): Akademi (v4.12023011900), Adaptable (401.1.52022112306), Boost (2022112800), Boost [GS] (2022111400), Boost Union (v4.1-r72023010511), Classic (2022112800), Foundation (401.1.02022112601), Klasse (v4.12023012500), LearnR (v1.72022052400), Moove (4.1.12022112801)

We have a whole bunch of moodles with the exact same system environment and versions of core and plugins.

Best regards Andreas

grabs commented 1 year ago

Hi Andreas,

thank you for pointing out this issue! The problem is fixed and the new version is published on the moodle plugin database.

Best regards Andreas

abkoch commented 1 year ago

Dear Andreas,

thank you very much. I've successfully tested version v4.3 (2023-06-23) and the error is gone.

Best regards Andreas