-
Bug
-
Resolution: Fixed
-
Minor
-
3.3.8, 3.4.5, 3.5.2, 3.6
-
None
-
MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
-
MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE
-
MDL-63960-master -
Testing MDL-62564, I had a problem with one of the testing sites (master). I did not reproduce it in stables (because I had way simpler/minimal configuration there).
The details are, more or less like:
- Had a couple of purposes, one without retention and another with 50y of retention. Both with the "protect" bit set.
- Also a some categories.
- Both the purpose with 50y of retention and one of the categories were set @ site level. Think that everybody else was set to inherit everywhere.
Then, when processing the deletion request (aka, approved => deleted), I got:
Adhoc task failed: tool_dataprivacy\task\process_data_request_task,Coding error detected, it must be fixed by a programmer: Cache definition tool_dataprivacy/purpose requires simple keys. Invalid key provided.
|
Debug info:
|
-1
|
Backtrace:
|
* line 958 of /cache/classes/loaders.php: call to cache_helper::hash_key()
|
* line 392 of /cache/classes/loaders.php: call to cache->parse_key()
|
* line 1546 of /cache/classes/loaders.php: call to cache->get()
|
* line 62 of /admin/tool/dataprivacy/classes/purpose.php: call to cache_application->get()
|
* line 353 of /admin/tool/dataprivacy/classes/data_registry.php: call to tool_dataprivacy\purpose->__construct()
|
* line 254 of /admin/tool/dataprivacy/classes/data_registry.php: call to tool_dataprivacy\data_registry::get_element_instance()
|
* line 1002 of /admin/tool/dataprivacy/classes/api.php: call to tool_dataprivacy\data_registry::get_effective_context_value()
|
* line 1093 of /admin/tool/dataprivacy/classes/api.php: call to tool_dataprivacy\api::get_effective_context_purpose()
|
* line 99 of /admin/tool/dataprivacy/classes/task/process_data_request_task.php: call to tool_dataprivacy\api::get_approved_contextlist_collection_for_collection()
|
* line 185 of /lib/cronlib.php: call to tool_dataprivacy\task\process_data_request_task->execute()
|
* line 74 of /lib/cronlib.php: call to cron_run_inner_adhoc_task()
|
* line 61 of /admin/cli/cron.php: call to cron_run()
|
So, somehow, "-1" was being passed and breaking the simple keys the cache is expected to have.
After some trials, I ended removing the retention periods in the purpose, cleaning the "protected" bit, purging caches and then the deletion was able to finish properly.
This describes de situation under I got the error. Will try to reproduce it again to see if I can give more detailed steps or find the exact point leading to the problem.
Only reproduced with master but, as far as the configuration is potentially the same in stables, I imagine it will be also reproducible there.
Will comment if I find any other detail. That's all for now.
- Discovered while testing
-
MDL-62564 Improve bulk deletion
- Closed