When installing module through UI, get error:

Notice: Undefined variable: finished in _batch_process() (line 343 of /includes/batch.inc).

CommentFileSizeAuthor
#10 error.png9.29 KBJSCSJSCS

Comments

mile23’s picture

Status: Active » Postponed (maintainer needs more info)

It might help to know which module.

bfroehle’s picture

Also, is this a consistent, reproducible problem? Or does it occur only transiently?

pixelsweatshop’s picture

It happens on 80% of the modules I have installed. I will do a test to see which ones it occurs on. I didn't take note as it appeared to happen on almost everyone. All modules still continue to install though.

bfroehle’s picture

So the module installs correctly, but you see this error at the very end? Can you walk me through the timeline of the installation process and where exactly you see the error?

Also, do you using the Overlay module, or have that module enabled?

Eduardo_Martinez’s picture

I have also the same error. is seems a problem with AJAX, because I can see, few seconds, an AJAX error message when some new modules are updating or new languages packs.

sun’s picture

Status: Postponed (maintainer needs more info) » Closed (cannot reproduce)

Sorry, without further information this issue can only be closed as not reproducible.

Feel free to re-open this issue if you want to provide further information. Thanks.

sun’s picture

Priority: Major » Normal
ericvermeulen’s picture

Version: 7.0 » 7.2

Hi There I have te same issue on the installation of Drupal 7.2. The actual installation seems to be finished as the percentage bar is at 100% and when I open the drupal site which has been installed I get the login screen. the actual error message is: Notice: Undefined variable: finished in _batch_process() (line 345 of D:\XXXYYYZZZ\includes\batch.inc). next step is to configure the site, but I don't get to that stage. please advise.

Eric

ericvermeulen’s picture

Hi There, I ran the install through the UI again and for some strange reason the error has disappeared, this is really wicked.
Cheers,
Eric

JSCSJSCS’s picture

Version: 7.2 » 7.4
StatusFileSize
new9.29 KB

I too am seeing this error in nearly all updates using the UI. Lat one was updating the VBO module. After the Update UI did it;s thing and it says to go to database update, there is a quick AJAX alert that flashes. I was able to capture it (see attached). Then the log shows:

Type php
Date Sunday, July 17, 2011 - 07:35
User admin
Location http://mydrupaljourney.com/authorize.php?batch=1&render=overlay&id=32&op=do
Referrer http://mydrupaljourney.com/authorize.php?batch=1&op=start&id=32&
Message Notice: Undefined variable: finished in _batch_process() (line 344 of /home/username/mydrupaljourney.com/includes/batch.inc).
Severity notice

Line 344 of includes/batch.inc:
$current = $total - $remaining + $finished;

LarsKramer’s picture

Title: When installing module through UI, get error » Ajax error when updating a module
Status: Closed (cannot reproduce) » Postponed (maintainer needs more info)

@JSCSJSCS: Can you reproduce this error on a completely fresh Drupal 7.4 installation with only VBO installed, and overlay.module disabled? From which version of VBO did you update?

jimbaer’s picture

Just had this flash of an Ajax error when downloading/installing upgrades for Chaos tools and Backup Migrate on a D7.4 installation. Ajax error screen was only present very briefly, not possible to see what it said. Updates appear to have been correctly installed, and both appear to be operating correctly. No error messages logged on Drupal reports.

LarsKramer’s picture

@jimbaer: Can you reproduce this using the steps described in #11: No other modules installed, and overlay disabled?

jcuzella’s picture

I am able to reproduce this on a fresh install when doing an upgrade from 7.0 to 7.4 on a site that was previously upgraded from 6.20.

Steps to reproduce:

1. Install Drupal 6.20
2. Manually upgrade all files to Drupal 7.0
3. Run update.php
4. Manually upgrade all files to Drupal 7.4
5. Run update.php

I see this error displayed on the "/update.php?op=results" page:

Notice: Undefined variable: finished in _batch_process() (line 344 of /var/www/includes/batch.inc).

jimbaer’s picture

Lars,
I can no longer raise this error. As far as I can see the only change made to my configuration in between not allowed for was removal of mod_security Apache module by my host to cure some jquery.cookie.js access problems.
I'm not confident enough to say that's the cause though, since I'm a bit of a novice at this stuff, and may have missed another change when fiddling with .htaccess to make a sub-domain work.

LarsKramer’s picture

Title: Ajax error when updating a module » Ajax error when updating or installing a module
Version: 7.4 » 7.7
Priority: Normal » Minor
Status: Postponed (maintainer needs more info) » Active

I managed to reproduce this finally, but so far only with Google Chrome, and Drupal 7.7. The problem seems to have been solved in 7.x-dev. I tested with Views and i18n, but it seems to happen with any module.

The steps to reproduce are:

  1. Install Drupal 7.7, standard profile
  2. Install Views through web UI (pasting the link)
  3. A very short AJAX error appears, but I don't get to read it

If you then delete the module folder and restart the browser, you can follow the same steps and the message will come again. You have to restart the browser, otherwise no message shows. I never enabled the module.

I tried this also in Firefox and IE, but was not able to reproduce there, so it might be a problem isolated to Google Chrome. On the other hand, it is strange then that it does not occur when using Drupal 7.x-dev.

LarsKramer’s picture

Component: update.module » overlay.module

Just tested with overlay.module disabled, and then the message no longer shows. So I guess the bug is in overlay.module, not update.module.

David_Rothstein’s picture

Sounds like this is at least partially a duplicate of #936686: "Installation failed" errors when installing modules from Update Manager w/ Overlay (which was fixed in 7.x-dev shortly after the 7.7 release so that would go along with what @LarsKramer found) but I'm not sure if all of it is... there are several reports in this issue that don't quite seem to be about the same thing.

webchick’s picture

Status: Active » Closed (duplicate)

I'm 99% positive this is a duplicate of #936686: "Installation failed" errors when installing modules from Update Manager w/ Overlay. Try updating to 7.x-dev and see if you have the same issue.

Mithrandir’s picture

Version: 7.7 » 7.31
Component: overlay.module » batch system
Issue summary: View changes
Status: Closed (duplicate) » Needs work

The notice comes from includes/batch.php's _batch_process() function that uses $finished and $old_set variables, which are only set, if $current_set['success'] is FALSE.

We see the errors when using any batch operation while the has_js cookie is not set (e.g. using standard Varnish configuration), so I assume that in those cases, we end up running _batch_process() at a point in time where $current_set['success'] is TRUE, but the batch is not completely finished.

Either way, with sane variable initialisation, these notices should go away without further logical problems.

Version: 7.31 » 7.x-dev

Core issues are now filed against the dev versions where changes will be made. Document the specific release you are using in your issue comment. More information about choosing a version.

Status: Needs work » Closed (outdated)

Automatically closed because Drupal 7 security and bugfix support has ended as of 5 January 2025. If the issue verifiably applies to later versions, please reopen with details and update the version.