Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
When running thunder_update_8112()
some other update functions are called. Unfortunately the updater does not check if the module of the requested function is enabled. If (i.e.) you don't have thunder_article enabled, the update will fail.
Proposed resolution
Run updates for enabled modules only.
Remaining tasks
Create pull request.
Comment | File | Size | Author |
---|---|---|---|
#3 | thunder-update_enabled_modules_only-2.patch | 4.26 KB | stBorchert |
Comments
Comment #2
stBorchertPull request: https://github.com/BurdaMagazinOrg/thunder-distribution/pull/480
Comment #3
stBorchertComment #4
mtodor CreditAttribution: mtodor at Thunder commentedCopy from GitHub PR
@stBorchert Thank you for reporting problem.
I'm not sure this is correct way to solve this problem. Ignoring some parts of configuration updates could lead to incorrect behaviour of introduced functionality or made changes. Currently we have extensive logging of failed configuration updates and with this change they are silently ignored.
Also we want to have one module where all configuration updates and update hooks will be collected. That means thunder_update_8112() hook has wrong approach.
I can't propose solution like this for following problem, it should not ever happen that update hook is executed and required configuration update definition files are not available for it. I would rather move all configuration update files into profile, where update hook is.
Comment #5
mtodor CreditAttribution: mtodor at Thunder commented@stBorchert
I have made other PR for this problem: https://github.com/BurdaMagazinOrg/thunder-distribution/pull/525
Can you please take a look and test?
As I have explained the problem is not in Updater functionality, but the wrong approach in update hook, where update hook relies on un-available resources.
Comment #7
mtodor CreditAttribution: mtodor at Thunder commentedComment #8
mtodor CreditAttribution: mtodor at Thunder commentedCrediting for review.
Comment #10
mtodor CreditAttribution: mtodor at Thunder commented