-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove version numbers from the extracted project folders when installing manually #6656
Comments
Could this be why sometimes people have/had trouble updating a module that was manually installed? I don't remember specifics but I remember there was an issue around that sort of strangeness. (It may have been unrelated and it may also be solved already but just jotting this in case it helps trigger a memory for someone who remembers more about that). |
I don't recall anything in the core issue queue, but my memory is not as it used to be. Perhaps it was reported in the forum (which I am not monitoring)? Others may know. |
...we could add a check in the status report for mismatching project names (based on their .info file) and respective folder names. Similar to how we check for duplicate modules in the codebase. |
I did some searching but couldn't find an issue for that. Maybe as part of this one we can include a test where an older version is installed manually, and then attempt to upgrade via the project installer and see if it works. |
That sounds like a good idea. I'm not good at writing tests, so I might need help with that. |
Ah ha! #3997 |
See? ...I told you my memory is not as it used to be ...yet another issue that I filed that I didn't remember 😅 👴🏼 |
Here's an attempt at fixing this: backdrop/backdrop#4831 Initially, I tried renaming/cleaning up the name of the project folder after it was extracted under the What I ended up doing instead is this:
At the moment all tests are passing - only missing function docblocks (pre-existing issue but I'm planning to fix them too regardless). Also planning to add tests for thing that we now know to be causing problems (but as I said, I'll need help with that). |
...oh, I'll also test to see if #3997 is related or whether the culprit for this issue here also had something to do with that issue there. |
When installing a module manually from GitHub, the URL of the .zip file looks like this:
https://github.com/backdrop-contrib/paragraphs/archive/refs/heads/1.x-1.x.zip
When you install manually via the "Install from a URL" option, you end up with a folder like this:
modules/paragraphs-1.x-1.x
.That is perfectly fine on your local or in hosting where you have direct access to rename folders, but in sandbox situations like Tugboat/Softaculous etc. you are stuck with the version number in the module folder. AFAIK, the modules keep working as expected even with these numbers in the folder names, but this looks messy, and it is more trouble than worth fixing, especially for less technical people.
We should be doing some "sanitization" and try to remove versions from module folder names after extracting the .zip. Doing that as part of the installation would:
The text was updated successfully, but these errors were encountered: