Invalid user message -editing button

Invalid user message -editing button

by george williams -
Number of replies: 2

Hi all,

Moodle version 3.9, php v7.3. mssqlserver 2017

All users have just started to receive the following error when selecting the editing button at the bottom of the site page (early on this afternoon):  


It then asks to continue, which takes them back to the Moodle homepage. We have a couple of course format plugins (tiles and grid) which disappear when this error pops up. Really don't know what is causing this error at the minute. Anyone come across something similar? 

Seeing a lot of these errors in the PHP log:

[16-Jul-2021 14:13:45 Europe/London] Default exception handler: Course or activity not accessible. Debug: You are not logged in

Error code: requireloginerror

* line 2711 of \lib\moodlelib.php: require_login_exception thrown

* line 29 of \mod\turnitintooltwo\ajax.php: call to require_login()

AND 

[16-Sep-2021 16:28:23 Europe/London] Default exception handler: Invalid user Debug: SELECT id FROM {user} WHERE id = ? AND deleted = ?

[array (

  0 => '1',

  1 => 0,

)]

Error code: invaliduser

* 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 566 of \course\format\tiles\classes\output\course_output.php: call to core_course_renderer->course_section_add_cm_control()

* line 178 of \course\format\tiles\classes\output\course_output.php: call to format_tiles\output\course_output->append_multi_section_page_data()

* line 267 of \course\format\tiles\renderer.php: call to format_tiles\output\course_output->export_for_template()

* line 99 of \course\format\tiles\format.php: call to format_tiles_renderer->print_multiple_section_page()

* line 290 of \course\view.php: call to require()

Any information or advice would be appreciated.

Thanks 


Average of ratings: -
In reply to george williams

Re: Invalid user message -editing button

by Ken Task -
Picture of Particularly helpful Moodlers

Looks like all related to this line:

line 29 of \mod\turnitintooltwo\ajax.php: call to require_login()

which points to the mod Turnitintwo.

Turnitin user?

https://help.turnitin.com/feedback-studio/moodle/plagiarism-plugin/administrator/getting-started/step-3-configuring-turnitin-in-moodle.htm

'SoS', Ken

In reply to Ken Task

Re: Invalid user message -editing button

by george williams -
Thanks for the reply, Ken.

Turns out it was similar to another incident https://moodle.org/mod/forum/discuss.php?d=407618 Guest user did not exist anymore in the mdl_user tbl. I am not sure how this has happened, as other posts on the incident seem to suggest it was after they ran an upgrade but we haven't upgraded or made any changes (as far as I am aware). Not sure how it has been removed. To be brutally honest, not too sure how the 'Guest user' is related to editing, but will look into it to see how how this impacts editing courses. Anyway, re-added Guest user and it is working again! 

Thanks for help.