I get the error when running 'drush up'. I had tried to set the directory on the config page at: /admin/config/media/imce_dir_man but the value never saves. I did a: 'drush dl imce_tools' to get the latest version and ran 'drush updb' (no updates). Tried to save the directory at the above config page and still value did not save. Any ideas how to fix?

Comments

tekante’s picture

Looks like the problem is with the function _pm_get_project_path in drush (I'm using version 4.5) which does not like the fact that the modules bundled in the imce_tools project are in a modules directory which it thinks is referring to a reserved modules directory.

    $path = _pm_find_common_path($release['project_type'], $extensions);
    $reserved = array('modules', 'sites', 'themes');
    if ((in_array(basename($path), $reserved)) && (!in_array($name, $reserved))) {
      drush_log(dt('Error while trying to find the common path for enabled extensions of project !project. Extensions are: !extensions.', array('!project' => $name, '!extensions' => implode(', ', $extensions))), 'error'); 

The values at this point in the code are:
$path: sites/all/modules/contrib/imce_tools/modules (this will vary based on your install)
$name: imce_tools

selwynpolit’s picture

So is the solution to change the name of the modules directory to something else? That seems like a fairly easy thing to do.

selwynpolit’s picture

So I changed the name of the sites/all/modules/imce_tools/modules to sites/all/modules/imce_tools/mods and that made drush all happy. I'll see if I can figure out how to make a patch and submit it, but for now this manual fix seems to work.

didaka’s picture

Changing the modules dir to something else works in my case as well.

hswong3i’s picture

Version: 7.x-1.0 » 7.x-1.x-dev
Assigned: Unassigned » hswong3i
Status: Active » Needs review
StatusFileSize
new43.55 KB

Just similar as my following 2 modules, we don't need an additional folder wrapper for submodules:

Patch attached just move all submodules out from folder "modules" to top level for 7.x-1.x. It should works as expected.

hswong3i’s picture

StatusFileSize
new44.51 KB

#5 patch works with 7.x-1.x GIT checkout, but not works with drupal.org packaged http://ftp.drupal.org/files/projects/imce_tools-7.x-1.x-dev.tar.gz, because the packaging script add some additional information at the tail of .info files.

Here is a temporary revamp of above patch, so it can works with distribution, e.g. http://drupal.org/project/drustack. Tested with above 7.x-1.x-dev.tar.gz package.

hswong3i’s picture

StatusFileSize
new5.92 KB

Refer to http://git.wikia.com/wiki/Patches, patch now created with:
git format-patch HEAD^ -M -C -s --keep-subject --stdout > ../imce_tools-rm_modules_git-1602226-7.patch

Therefore able to show the rename action and so works for both GIT checkout and -dev.tar.gz package.

hswong3i’s picture

Status: Needs review » Reviewed & tested by the community

#7 had been applied to DruStack for more than a month and no more error report by customers. Shall we simply push this to latest -dev?

dkingofpa’s picture

Assigned: hswong3i » Unassigned
Issue summary: View changes

Un-assigning in the hopes this catches the attention of the module maintainers, gets committed, and we get a new release.

  • Commit 98d4bfe on 7.x-1.x authored by hswong3i, committed by tekante:
    Issue #1602226 by RobKoberg, hswong3i: Error while trying to find the...
tekante’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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

estepix’s picture

The same problem happens on a Drupal 6.31 install, module version 6.x-1.2. Any chance to get this fix committed for this older version as well?

should I open a new thread to track this or change this same thread to 6.x-1.2 version and set as "Active"?

thanks in advance

estepix’s picture

Version: 7.x-1.x-dev » 6.x-1.2
Status: Closed (fixed) » Active

Reopening as the same problem happens on a Drupal 6.31 install, module version 6.x-1.2. Any chance to get this fix committed for this older version as well?

  • tekante committed 4b3ecd3 on
    Issue #1602226 by RobKoberg, hswong3i: Error while trying to find the...
tekante’s picture

Status: Active » Fixed

Corrected with commit 4b3ecd3686b67061c7ddd65208017967b3849b24, new release should be out shortly.

Status: Fixed » Closed (fixed)

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