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.
domain_theme does not respect any non-existing theme settings and just rewrites global $conf settings with empty value instead of just skipping the override.
Use case:
Omega 4 theme stores theme settings in .info file. If domain_theme module is enabled, any theme settings overrides in code are rewritten by NULL.
Solution
in domain_theme_set_variables() change
if (!empty($theme['settings'])) {
$settings = domain_unserialize($theme['settings']);
to
if (!empty($theme['settings']) && $settings = domain_unserialize($theme['settings']) && !empty($settings)) {
Comment | File | Size | Author |
---|---|---|---|
#1 | domain-null-settings-2219977-1.patch | 698 bytes | alex.skrypnyk |
Comments
Comment #1
alex.skrypnykPatch for above code
Comment #2
agentrickardWouldn't this be better?
The problem is not that $settings is empty, it's that it resets the entire $conf array element. Your patch doesn't fix that behavior.