Media gallery takes over the page deliver callback for lightbox paths, but media_gallery_lightbox_page_deliver() doesn't call drupal_page_footer(), so these callbacks can't use the page cache.

I'm not sure why drupal_page_footer() wouldn't be called here, so the attached patch adds this.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Moloc’s picture

Status: Needs review » Needs work

Having a look into the two functions drupal_page_footer() and drupal_exit(), it seems, that this patch needs some more work?

Both functions execute the following lines:

 module_invoke_all('exit');
  drupal_session_commit();

For example, using the core statistics module, and the "access log" option is activated, the module will create two log entries, because hook_exit is executed two times in one page request.
Therefore i assume, this patch needs work.

David_Rothstein’s picture

Yeah, it looks to me like if the patch is adding drupal_page_footer(), it should probably also remove the drupal_exit().

msonnabaum’s picture

Status: Needs work » Needs review
FileSize
471 bytes

Good call.

lsolesen’s picture

@msonnabaum Is this still a valid issue?

Moloc’s picture

Status: Needs review » Reviewed & tested by the community

Patch applies cleanly and works as expected.

Moloc’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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