I updated core one or two days ago and everything was working find until I tried adding a module. It keeps failing with the message:

Error installing Image Block. Error installing / updating. Error: File Transfer failed, reason: /xampp/htdocs/backdrop/modules is outside of the C:\xampp\htdocs\backdrop

The module file is there - I haven't moved anything around, and other than this, the site is working perfectly. Status report show no issues at all, and the the only error messages over the past few days are the ones related to installing  a module.  I've cleared caches and run database updates (nothing pending there).  I updated core by simply deleting the old version and then copying over the new core folder. I went to the uninstall tab and had no problem removing an unused module there.

I found reference to a few similar errors from 2019, but nothing recent. Don't know what else to check.

Here's the full message (and I did try other modules with the same result):

  • Failed to install one project.
  • Error installing Image Block. Error installing / updating. Error: File Transfer failed, reason: /xampp/htdocs/backdrop/modules is outside of the C:\xampp\htdocs\backdrop

Fortunately, I was able to add the module manually with no issues, and could even update the database, but the installing through the interface still won't work.

 

Accepted answer

@DanM If it works for you please report back in the issue queue https://github.com/backdrop/backdrop-issues/issues/6226 or here. We were beneficiaries of the work by @argiepiano who quickly delved into it and came up with the PR to fix it.

Comments

Thanks for the reply.  That may be beyond my skill level.

I am on Windows 11 and xampp is installed in C:\ 

Glad it's a windows error and not fatal to my work so far.

Are there basic steps to using a PR, including any special software to compile it?

 

The other option is to manually put the module's new version (the one you want to install) in the module folder, then run https://example.com/update.php

 

OOPS, you did that already :-D

I can survive with that workaround. Hoping to deploy the site in approx. one month. I'm may try the PR when I find the basic steps. (I might have tooled with that a lot of years ago using Netbeans, I think.)

Otherwise, would I have to wait until the next core release to fix this? (January, right?)

Fortunately, it doesn't seem to mess up anything else, and I'm relieved that it isn't something I did. :-)

I´ve the same problem (cannot install modules in Backdrop CMS 1.26.0, XAMPP, Windows 11) & Cannot update to Backdrop v. 1.26.1 

Solution:

1) install manually Backdrop CMS 1.26.1  Rename the core directory in the root directory of your current codebase "core-old" (xammp/htdocs/backdrop/core ==> xampp/htdocs/backdrop/core_old), and move it outside your Backdrop docroot

Put the new core directory from Backdrop CMS 1.26.1 inside your docroot (xammp/htdocs/backdrop) Run update.php by navigating to http://backdrop/core/update.php

2) And now I can install any module.

We commonly put out a bug-fix release a week or two after a minor release, if there are any major bugs discovered which need attention. 

So, I can't promise anything, but I expect that this might be fixed very soon in a public bug-fix release.

This problem only happens with Windows OS. Typically, production servers don't use Windows (they typically use Unix/Linux), so you likely won't encounter this problem in production. 

There are different ways to patch core. I use this:

- Download the diff file at https://github.com/backdrop/backdrop/pull/4521.diff

- Put it in the root of your Backdrop installation

- Using ssh, run patch -p1 <patch-diff.githubusercontent.com_raw_backdrop_backdrop_pull_4521.diff

(or the name of the file you downloaded)

@DanM Yes, the PR fixes the issue. Your experience with XAMPP installed on the c: drive helps to expand the understanding as it also occurs with portable configurations of XAMPP.

You can either download the patch and apply it as described above. You will need to ensure there is a space between "< name-of-patch-file.ext"

Alternatively, there are two files changed in the PR which you can download directly and copy to your platform replacing the existing files:

https://github.com/argiepiano/backdrop/blob/1.x-issue-6226/core/includes...

https://github.com/argiepiano/backdrop/blob/1.x-issue-6226/core/modules/...

The 2nd of these is only for completeness it is not necessary to fix the problem.

This is not the usual approach but it is a quick fix if you need it.

@izmeez Thanks so much for your help and the speedy response.

@izmeez This worked for me. Left a message on the github issue page. Thanks again for the help. - Dan

I have been unable to update to core version 1.26.1 using the GUI receiving an http error. I am able to update other modules through the GUI. I am not sure why I am having difficulties updating core. I wonder if it has anything to do with my previous manually updating and patching core. While I still haven't identified the cause I am posting what I am encountering in case anyone else encounters similar issues.

I may be wrong, but I believe it's not yet possible to update core through the GUI. It's much easier to do than it was in Drupal 7 though.  Last time I did it, I only needed to download the release and replace ONLY the CORE folder in my Backdrop installation. I then would normally run update.php, though I believe this incemental release states that it's not necessary to do that if coming from 1.26.0.

Do a google search:

how to update backdrop core

@argiepiano that issue is resolved. This is a new problem, that I am experiencing. I only posted it in this thread in case someone else, possibly @DanM experienced the same issue since we had exchanged some ways to "patch" the 1.26.0 release.

While it does look remiscient I think it is different. I am able to install updates of contrib modules through the GUI without any problem. I am only having http error when trying to update core through the GUI. I haven't figured out why that is and since I haven't explored it enough I didn't think I was ready to file an issue. Maybe tomorrow.

@DanM I did do a "manual" update the way it is described https://docs.backdropcms.org/documentation/core-updates but I thought it was possible to do a core update through the GUI. I think I did that before from 1.25.0 to 1.26.0 before running into this issue. Experiences that are faded and need refreshing.

@izmeez I just assumed it wasn't possible yet and did it manually, so I guess I'm having the same issue.

I am not sure of my previous recollection on being able to update core through the GUI and have not yet created a test setup to confirm that.

Since I do not believe that manually updating core previously should cause any difficulty with now updating core through the GUI, I have opened a new issue - https://github.com/backdrop/backdrop-issues/issues/6258

I will add any other findings to that issue.

@izmeez - I just checked my available updates and saw that I was on 1.26.0 and saw the option to update via the GUI was there. It worked flawlessly. I will also respond in the issue queue. Now on 1.26.1.  Thanks!

@DanM Happy to hear you were able to update through the GUI. Do you have SSL certificate fully enabled on your site? Maybe you could add your comments of successful update through the GUI and SSL cert status to the new issue as a contrast to my experience. Thank you,

https://github.com/backdrop/backdrop-issues/issues/6258