If I start a batch job in the modalframe I see that the batch page is not rendered thru the modalframe template. I use the standart garland theme.

Next question: How can I close the modalframe automatically after the batch process is finished?

I didnt found any solutions for this problems yet.

CommentFileSizeAuthor
#3 modalframe_1269022_batchjob.patch2.18 KBhefox
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

broncomania’s picture

Hm, could it be that I am the only one who tried it? I can't believe :-) but any suggestion is still welcome to find a solution for I think simple task or is it so complicated?

attiks’s picture

you're not the only one, i just noticed the same, but no idea why and no idea on how to solve it :/

hefox’s picture

Status: Active » Needs review
FileSize
2.18 KB

Okay this is a combination patch of the two issues, closing a modalframe and batch page.

It adds a menu entry, modalframe-batch, that can be used instead of 'batch'

  $batch = &batch_get();
  $batch['url'] = 'modalframe-batch';

Use that after setting the batch, but before the batch is processed.

It provides another menu callback, modalframe-close, that triggers the modalframe close.
It tries to autodetect that case, but otherwise

  $batch = &batch_get();
  $batch['redirect'] = 'modalframe-close';

should do it.

It's ugly as fuck. I hate the patch. but it seems to work and couldn't find an elegant way to get it working. *sigh*

hefox’s picture

Title: Batch Job isnot using the modalframe template » Batch Job is not using the modalframe template
dsnopek’s picture

Version: 6.x-1.7 » 7.x-1.x-dev
Issue summary: View changes
Status: Needs review » Needs work

Wow, integrating with batch jobs looks pretty insane. :-/

The situation might have gotten better in Drupal 7 with hook_batch_alter():

https://api.drupal.org/api/drupal/modules%21system%21system.api.php/func...

I can't commit anything to the D6 version without also committing to the D7 version, so let's try and make a (hopefully) cleaner version for D7 first.

Yuri’s picture

Anyone found a solution for this?