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.

CommentFileSizeAuthor
#3 2939524-3.patch3.48 KBmarkhalliwell
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta created an issue. See original summary.

markhalliwell’s picture

Assigned: Unassigned » markhalliwell

It's because the maintenance page is like a combination of both html and page 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 and page theme hooks and prepend them to the maintenance_page theme hook.

markhalliwell’s picture

Assigned: markhalliwell » Unassigned
Status: Active » Needs review
FileSize
3.48 KB

This 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.

m.stenta’s picture

Status: Needs review » Reviewed & tested by the community

I think this fixed it! I tried the same test with the patch (toggled maintenance mode) and didn't see the notice.

  • markcarver committed f57a214 on 7.x-3.x
    Issue #2939524 by markcarver, m.stenta: Notice: Undefined variable:...
markhalliwell’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

Electronic-Festivals.com’s picture

I 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?