Problem/Motivation
Three update hooks in vlsuite_block submodules reference bundle classes but these classes are not imported with use statements in their respective .install files. This causes database updates to fail when running drush updatedb.
The affected modules are:
- vlsuite_block_icon
- vlsuite_block_image
- vlsuite_block_cta
When attempting to run database updates, the following errors occur:
[error] Class "VLSuiteBlockIcon" not found [error] Update failed: vlsuite_block_icon_update_10003 [error] Class "VLSuiteBlockImage" not found [error] Update failed: vlsuite_block_image_update_10002 [error] Class "VLSuiteBlockCta" not found [error] Update failed: vlsuite_block_cta_update_10002
This blocks all pending database updates from running, preventing users from updating their sites properly.
Steps to reproduce
- Update VLSuite from 2.2.2 or older to 2.3.2
- Run
drush updatedbor visit/update.php - Observe the update hooks failing with "Class not found" errors
Proposed resolution
Add the missing use statements at the top of each affected .install file (after the file docblock, around line 7).
File: modules/vlsuite_block/modules/vlsuite_block_icon/vlsuite_block_icon.install
Add:
use Drupal\vlsuite_block_icon\Entity\Bundle\VLSuiteBlockIcon;
File: modules/vlsuite_block/modules/vlsuite_block_image/vlsuite_block_image.install
Add:
use Drupal\vlsuite_block_image\Entity\Bundle\VLSuiteBlockImage;
File: modules/vlsuite_block/modules/vlsuite_block_cta/vlsuite_block_cta.install
Add:
use Drupal\vlsuite_block_cta\Entity\Bundle\VLSuiteBlockCta;
Remaining tasks
None.
User interface changes
None.
API changes
None.
Data model changes
None.
Issue fork vlsuite-3556937
Show commands
Start within a Git clone of the project using the version control instructions.
Or, if you do not have SSH keys set up on git.drupalcode.org:
Comments
Comment #2
juanjolComment #6
juanjolComment #7
juanjolComment #8
juanjolMR ready to review. Three files are fixed with the correct use statements.
Comment #9
eduardo morales albertiMR reviewed, fixed!