I am having intermittent problems when Plugin Manager updates its own module code. Unfortunately, I cannot replicate these issues on a fresh Drupal install.

Comments

DrewMathers’s picture

Case 1

warning: rmdir(files/plugin_manager_extraction/plugin_manager/) [function.rmdir]: Directory not empty in /home/[account ID]/public_html/sites/all/modules/plugin_manager/plugin_manager.admin.inc on line 310.

Case 2

    * Unable to upload plugin_manager/plugin_manager_search.css
    * Unable to install plugin_manager
DrewMathers’s picture

Case 1: I see a problem with the following code from plugin_manager.admin.inc line 306

    foreach (array_reverse($files) AS $file) {
      // Remove the extracted files.
      $file = file_directory_path() .'/plugin_manager_extraction/'. $file;
      if (is_dir($file)) {
        rmdir($file);
      }
      else {
        unlink($file);
      }
    }

This will sometimes try to rmdir non-empty directories. This should really be done in two separate loops, the first to unlink files, the second to rmdir directories.

porg’s picture

FOREWORD:

I did not use and update my Drupal installation with its many modules for 1 year (on my offline test installation).
So after the core update, a lot of modules needed to be updated at once.
This took many attempts and many times returning to the last backup state, and starting over again. Wasted a whole working day!

MY RECOMMENDED WORKFLOW for a massive update process with Update Manager (UM) with as little effort/troubles possible:

1) At first of all modules update UM itself! But not through itself (its own mechanisms), but rather through manual installation! Strongly recommend, as UM seems to fail to run from and update to its codebase at the same time. Logical, somehow.
2) Run /update.php
3) In your php.ini or your VirtualHost settings set PHP's max_execution_time to a large value, i.e. 3000. The default 30 is far to small. The update process will always timeout, as experienced by others in: #935718: Fatal error: Maximum execution time of 30 seconds exceeded. And then, if only half of the (partially interdependent!) modules were updated, the mess starts, leaving you in states, where only a return to a previous backup helps!
4) Update all other plugins through UM.
5) Run /update.php
6) Set max_execution_time back to the reasonable default value of 30 seconds.

And of course always make backups before critical steps.