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.
In a lot of places Omega doesn't seem to consider the fact the subthemes may unset certain variables in preprocess/process hooks. Omega just assumes that everything is set. It do a lot more isset() checking in general. The attached patch (to follow) fixes the few places that have hit me, but I suspect that as other variables get unset in base themes, similar problems wil occur.
Comment | File | Size | Author |
---|---|---|---|
#7 | 1331014.7-omega-undefined-index-warnings.patch | 1.31 KB | mrfelton |
#4 | 1331014.4-omega-undefined-index-warnings.patch | 1.91 KB | davidseth |
#1 | 1331014.1-omega-undefined-index-warnings.patch | 2.63 KB | mrfelton |
Comments
Comment #1
mrfelton CreditAttribution: mrfelton commentedComment #2
Cellar Door CreditAttribution: Cellar Door commentedThis would be a good 3.1 fix I think
Comment #3
himerus CreditAttribution: himerus commentedpatch fails to apply, and of the logic isn't sound (the way I see it)
<?php if (isset($block->subject) && $block->subject): ?>
would still throw a notice error should $block->subject not exist by being unsetComment #4
davidseth CreditAttribution: davidseth commentedHere is a cleaner patch.
@himerus, the logic is sound. This is tested on a few large sites we are running and indeed removes the warning.
Comment #5
davidseth CreditAttribution: davidseth commentedComment #7
mrfelton CreditAttribution: mrfelton commentedPatch updated against latest dev.
Comment #8
LeDucDuBleuet CreditAttribution: LeDucDuBleuet commentedPatch in #7 worked for me.
Thx a lot!