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.
Updated to Bootstrap 7.x-3.18 and got this PHP notice:
Notice: Undefined variable: grddl_profile in include() (line 18 of /var/www/html/profiles/farm/themes/bootstrap/templates/system/maintenance-page.tpl.php).
It happened twice in my Recent Log Messages - but I can't seem to replicate it - not sure exactly what triggers it to happen.
Comment | File | Size | Author |
---|---|---|---|
#3 | 2939524-3.patch | 3.48 KB | markhalliwell |
Comments
Comment #2
markhalliwellIt's because the maintenance page is like a combination of both
html
andpage
theme hooks.In my effort to replicate this, I had manually implemented the base theme's implementations:
https://drupal-bootstrap.org/api/bootstrap/templates%21system%21maintena...
Unfortunately, this means that it doesn't include core's (which is what adds
grddl_profile
):https://api.drupal.org/api/drupal/includes%21theme.inc/function/template...
I suppose the proper fix would be to do a theme registry alter to copy over the preprocess and process functions from both
html
andpage
theme hooks and prepend them to themaintenance_page
theme hook.Comment #3
markhalliwellThis should do the trick. I tested this myself by putting it into maintenance mode, loading the page and then checking the db logs. It doesn't appear to have any more issues. Let me know if you run into any more problems with this.
Comment #4
m.stentaI think this fixed it! I tried the same test with the patch (toggled maintenance mode) and didn't see the notice.
Comment #6
markhalliwellComment #8
Electronic-Festivals.com CreditAttribution: Electronic-Festivals.com commentedI recently installed 7.x-3.19 and came up with an error.
So I switched back to 7.x-3.18 and implemented patch by patch.
After implementing this 2939524-3.patch, any other module installation will throw the following error on /authorize.php
Fatal error: Uncaught Error: Call to undefined function menu_get_object() in ../includes/theme.inc:2580 Stack trace:
#0 ../includes/theme.inc(1125): template_preprocess_html(Array, 'maintenance_pag...')
#1 ../includes/errors.inc(254): theme('maintenance_pag...', Array)
#2 ../includes/bootstrap.inc(2609): _drupal_log_error(Array, true)
#3 [internal function]: _drupal_exception_handler(Object(Error))
#4 {main} thrown in ../includes/theme.inc on line 2580
Switching back to 7.x-3.18 or de-install 2939524-3.patch fixes the issue.
Any ideas how this is connected?