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.
ThemeKey contains an basic integration for the Domain Theme module. That integration should be migrated to Domain ThemeKey module.
Comment | File | Size | Author |
---|---|---|---|
#6 | migrate-domain-theme-integration-2510924-6.patch | 2.95 KB | Loparev |
#1 | migrate-domain-theme-integration-2510924-1.patch | 1.59 KB | Loparev |
Comments
Comment #1
Loparev CreditAttribution: Loparev commentedComment #2
Loparev CreditAttribution: Loparev commentedComment #3
Loparev CreditAttribution: Loparev commentedBut I didn't understand how can I detect if this functionality was in use? One thing that I can is do something like this:
if (module_exists('domain_theme')) {
// show some warning
}
but module_exists() function checks if module installed and enabled. So, if this update will be launched when Domain Theme is disabled then user will not see this warning message.
I decided to show some warning message anyway.
Comment #4
mkalkbrennerThe additional information must not be shown to users that haven't installed domain_theme.
I recommend a different way to inform the user. Have a look at https://api.drupal.org/api/drupal/modules!system!system.api.php/function...
We should implement hook_requirements() and set a constraint on the 'update' phase:
if domain_theme is installed but domain_themekey is not, return REQUIREMENT_WARNING and a deteiled description.
I think we should not return REQUIREMENT_ERROR because there might be use cases, where users installed domain_theme and integrated it with themekey using themekey_compat but don't use domain specific theme settings. These people don't need domain_themekey.
That said, we can add a second constraint to the 'runtime' phase:
if the user activated domain specific settings but domain_themekey is not installed, return REQUIREMENT_ERROR.
Comment #5
mkalkbrennerComment #6
Loparev CreditAttribution: Loparev commentedComment #7
Loparev CreditAttribution: Loparev commentedComment #9
mkalkbrennerI adjusted the patch a little and committed it. Thanks.