I want to install the deco theme and I get the following error

* Could not guess the ftp directory for drupal.
* Unable to install deco

Then there is the problem, that the installation of deco is already in the queue and the plugin manager wants to install it all the time.
A Function and a button to clean the queue would help.

Comments

Anonymous’s picture

We are actually in the process of fixing those two issues. Jabapyth has been working on a completely new search / queue interface. (A rather nice one at that.) I am (with time left between classes) trying to move all of the guess work onto a configuration page. Hopefully shouldn't be too much longer.

Anonymous’s picture

The "settings" page now allows you to enter the ftp path to your Drupal installation. If you give it a path, it will use the one you supply rather than trying to guess it. (This is in dev.)

magoo’s picture

Version: 6.x-1.1 » 6.x-1.2

I have the same issue using 1.2.

The module logs in on my FTP server but I get the same errors as mentioned in the original issue report.

Some information:
- ftp account is working
- if ftp account root is XXX
- drupal is installed in XXX/d6

I tried to put /d6 in the "FTP path" on the setup page without any better results

thanks in advance,

--
magoo

jabapyth’s picture

Status: Active » Postponed (maintainer needs more info)

now it still says "unable to guess drupal install path"?
If you've entered a custom path in your pm_settings page, then that means that the directory you entered was invalid (i know, the error isn't very descriptive. I just committed a patch to fix this).

magoo’s picture

Title: theme install fails » install directory error
Version: 6.x-1.2 » 6.x-1.x-dev

with dev 1.X of today :

our provided drupal install directory is invalid. Please change it here

When I remove my setting for the FTP path I get:

Could not guess the ftp directory for drupal.

What do you test to validate that the directory exists?

jabapyth’s picture

Assigned: Unassigned » jabapyth
Status: Postponed (maintainer needs more info) » Fixed

There was an error in our directory checking. I've sent up a patch.

magoo’s picture

Status: Fixed » Needs work

Ok,

As it is still not working, I looked at the test you're doing for the user provided path and found this:

is_dir($ftp_path))

This will usually not work as ftp paths (absolute) are usually not correlated with system path and in the example of "ftp path" you request the beginning slash.

You need to test the presence of the directory in the ftp connection and not the filesystem.

here is my version starting on line 111:

Your tests are commented out.


  if (empty($ftp_path)) {
    foreach ($local_path AS $index => $value) {
      unset($local_path[$index]);
      if (ftp_nlist($connect, implode('/', $local_path) .'/'. $dir)) {
        $ftp_path = implode('/', $local_path) .'/'. $dir;
        break;
      }
    }
  }
  else {
    $ftp_path = $ftp_base_dir . $ftp_path .'/'. $dir;
    drupal_set_message($ftp_path, 'information');
// magoo: this is not always equivalent to a system path
//    if (!is_dir($ftp_path)){
    if (!ftp_nlist($connect, $ftp_path)){
       drupal_set_message(t('Your provided drupal install directory is invalid. Please change it ').l('here','admin/plugin_manager/settings'), 'error');
       return FALSE;
    }
  }

  // If we couldn't guess it, then quit.
// magoo: same remark and it has no value added to test is_dir here
//  if (!isset($ftp_path) || !is_dir($ftp_path)) {
  if (!isset($ftp_path)) {
    drupal_set_message(t('Could not guess the ftp directory for drupal.'), 'error');
    return FALSE;
  }

btw, another modification I suggest:
in "plugin_manager/plugin_manager.admin.inc" change line 678 to:

    drupal_goto("admin/plugin_manager/install");

tell me what you think about all this!

--
magoo

jabapyth’s picture

Status: Needs work » Fixed

umm its still not working? look in the current CVS code: ive gotten rid of the whole "is_dir($ftp_path)" thing, which didnt work. Sorry for you to have spent all that effort... >.<
I guess the devel build hadn't updated at the time you looked at it.

magoo’s picture

Okay!

Strange it did not update the 1.X package faster. Maybe it is a daily job.

jabapyth’s picture

yes, I believe it does update daily. Deploying directly from CVS is you best chance at getting the *absolute latest* updates, but its usually not necessary.

Anonymous’s picture

Status: Fixed » Closed (fixed)

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

mrnags’s picture

Version: 6.x-1.x-dev » 6.x-1.9
Component: Code » Miscellaneous
Assigned: jabapyth » mrnags

Instead of copying the plugin manager module to "\drupal\modules" directory (this is where the default drupal modules go!), try copying the module to "drupal\sites\all" and install. This will solve the issue.

Anonymous’s picture

Thanks for this advice, it was help me to resolve this issue.
May be it would be a good idea to include this advice into module description?

alleycat7’s picture

#12 Thanks for the advice.

Just one thing: the plugin manager folder should be placed in "drupal\sites\all\modules".