Problem/Motivation
During execution of update hooks, Drush fails with the following error: The module module does not exist
> [notice] Update started: opigno_learning_path_update_9009
> [error] The module module does not exist.
> [error] Update failed: opigno_learning_path_update_9009
[error] Update aborted by: opigno_learning_path_update_9009
[error] Finished performing updates.
Steps to reproduce
Apply module update from a previous version, in my case I was applying update to "opigno/opigno_lms", via composer 1.x, from version 3.0.4 (opigno_learning_path was in version 3.0.3, loaded as dependency of opigno_lms).
Now using "opigno/opigno_lms" version 3.1.1
Proposed resolution
Resolution to the hook_update_9009 is required, since it called incorrect set of function arguments:
_opigno_module_apply_update('module', 'opigno_learning_path', 'config/install', [
'core.entity_view_display.group.learning_path.default',
'image.style.learning_path_thumbnail',
]);
// Note that the "_opigno_module_apply_update" requires first argument to be a module name (it appears that a file extension was passed instead).
The expected function call is:
_opigno_module_apply_update('opigno_learning_path', 'config/install', [
'core.entity_view_display.group.learning_path.default',
'image.style.learning_path_thumbnail',
]);
Remaining tasks
- Validate the patch provided by a broader community
- commit to the module codebase
User interface changes
N/A (no)
API changes
N/A (no)
Data model changes
N/A (no)