see patch.

Comments

gábor hojtsy’s picture

Status: Needs review » Needs work

The download link on the release in the database is supposed to contain the whole URL to download the release. If your database does not contain that, then that is some other issue in a module which filled that up.

tobiasb’s picture

StatusFileSize
new703 bytes

The download link is not the homelink (http://drupal.org/project/drupal).

In l10n_localpacks.module line 146

$path = $package = trim(preg_replace('!(^'. preg_quote($workdir, '!') .')(.+)\.tar\.gz!', '\2', $path), '/');

$path -> drupal-6.x-dev

line 160

l10n_localpacks_save_data($project_uri, ($project_title ? $project_title : $project_uri), $release_version, $path .'.tar.gz', filemtime($file->filename));

But what is the download link http://ftp.drupal.org/files/projects/drupal-6.x-dev.tar.gz orhttp://example.org/foo/drupal-6.x-dev.tar.gz?

tobiasb’s picture

Status: Needs work » Needs review
gábor hojtsy’s picture

Status: Needs review » Active

Committed the $output patch. Setting back to 'active' for the remaining issue.

The download_link is not the home link, but it still should be the whole download link where the file can be obtained. It might not be a drupal.org hosted project. The Gallery2 or the Open Atrium project uses l10n_server to translate projects hosted elsewhere, so the core l10n_server code should not make assumptions on where a project is hosted / from where it is downloadable. Therefore we should not compute this on display. If the file is downloadable locally, then a local file path is just right. l10n_localpacks can also translate non-drupal.org hosted code, like Gallery2 or Open Atrium, so it might not be best to assume a drupal.org download path either. Therefore there is this l10n_localpacks_home_link setting, which controls a similar behavior for the home link. Maybe we can just generalize (rename/retitle) that and apply to both the home link and the download link too. But I think a local download link is not an issue, as long as you are not deleting files after being parsed.

gábor hojtsy’s picture

Title: Undefined variable and broken download links (Releases of project foo) » No download link stored for some projects

So can we somehow find out how did any of your projects end up without download links?

gábor hojtsy’s picture

Also, this might be highly related to #588604: Download link not properly set in l10n_localpacks.

SebCorbin’s picture

Issue summary: View changes

6.x is now discontinued

SebCorbin’s picture

Status: Active » Closed (won't fix)