-
Bug
-
Resolution: Fixed
-
Minor
-
3.2.4, 3.3, 3.4
-
Any
-
MOODLE_32_STABLE, MOODLE_33_STABLE, MOODLE_34_STABLE
-
MOODLE_32_STABLE, MOODLE_33_STABLE
-
MDL_59834-Indexing_of_personal_messages
-
This was reported first on https://github.com/catalyst/moodle-search_elastic/issues/27 as a bug of the search_elastic plugin, but was identified as a Moodle core bug by mattporritt.
Steps to reproduce:
- Create a Moodle instance with two users in the same course
- Make sure that global search is properly set up and that the "Messages - received" and "Messages - sent" search areas are active
- Have the first user send the second a message
- Have the second user respond to the first user message
- Delete the first user
- Run the site index task (/search/cli/indexer.php)
Expected result:
- The message exchange with the deleted user shouldn't be indexed.
Actual result:
- Indexing the message fails quite ungracefully with a debug trace:
++ Error retrieving core_message-message_received 1 document, not all required data is available: Invalid user ++
* line 59 of /message/classes/search/base_message.php: call to debugging()
* line 62 of /message/classes/search/message_received.php: call to core_message\search\base_message->get_document()
* line ? of unknownfile: call to core_message\search\message_received->get_document()
* line 103 of /lib/classes/dml/recordset_walk.php: call to call_user_func()
* line 382 of /search/engine/elastic/classes/engine.php: call to core\dml\recordset_walk->current()
* line 666 of /search/classes/manager.php: call to search_elastic\engine->add_documents()
* line 93 of /search/cli/indexer.php: call to core_search\manager->index()
Processed 1 records containing 1 documents, in 0.028 seconds.
mattporritt's guess was that \core_message\message_sent get_document() needs to be modified to deal with missing users.
- Testing discovered
-
MDL-60039 Messaging search areas use timecreated instead of timeread to index search
- Closed