Closed (fixed)
Project:
Project
Version:
7.x-2.x-dev
Component:
Releases
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
17 Apr 2015 at 22:19 UTC
Updated:
25 Oct 2015 at 17:44 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
jojonaloha commentedAttached patch should resolve this issue.
Note: Since this is run from drush, either
$base_urlshould be set or it should be provided with the--urioption.Comment #2
jojonaloha commentedComment #3
hass commentedThe patch required a re-role, but this is RTBC.
URI param is important as noted or all urls are
http://default...I wonder how d.o can run without this patch.
Comment #4
drummDrupal.org alters it with a
project_release_download_base_*variable, seeproject_release_project_behavior_settings(). We'll have to make sure this handles those URLs properly.Comment #5
hass commentedIt works with custom http:// and https://, but not for ftp:// urls.
The root cause is file_create_url(). FTP urls require that the site has FTP stream wrapper registered.
Should we do this inside the project module or in an external module? Maybe d.o can just install storage api and we are done.
It's not the patch here that is wrong.
Comment #6
hass commentedThis snippet allows using FTP links. But I fear that is not clean enough for sites that may use storage API and also define ftp stream wrapper. However it proves that this file_create_url() works with the patch and
ftp://links.We should add a form validation to the node type form to check if the entered scheme is supported by Drupal.
Comment #7
hass commentedThis patch validates the entered base URL to have a valid stream wrapper registered. So nothing can go wrong any longer if systems are not properly configured or missing the core requirements.
Comment #8
hass commentedNow fully tested with ftp/http/https and without URL.
Comment #9
drummTested well, committed.