#1537 Viewing attachments with namespace projects gives 404
Closed: Fixed 4 years ago Opened 4 years ago by jflory7.

Summary

When viewing attachments in a project that uses namespaces, attachment links will load the file without the namespace in the URL (giving a 404 error).

Analysis

This was originally noted in the ambassadors-na/tasks Pagure. For example, there is a file named revised Fedora FAmNA Budget FY2017 Nov.pdf in the ticket. Pagure gives this link to the file, but this gives a 404 error (but you can find the file if you manually add the namespace, like here).

Pagure attachments should be conscious of if the repository uses a namespace, and generate the URL for the attachment accordingly.

Expected behavior

  1. User uploads file to ticket in project with namespace.
  2. User clicks file, link contains namespace.
  3. User sees file.

Actual behavior

  1. User uploads file to ticket in project with namespace.
  2. User clicks file, link does not contain namespace.
  3. User is given a 404 error.

So when you upload a file in a comment, it seems to work, what seems to not work is when attaching a file in the original comment of the issue.

I got the fix for this (pretty much a one-liner).

@pingou changed the status to Closed

4 years ago

Apparently, it still happens in comments, as you can see in https://stg.pagure.io/fedora-latam/tickets/issue/362

I wonder if this isn't a bug on pagure-importer, maybe @cverna or @vivekanand1101 could take a look at it (though I know @vivekanand1101 is currently quite busy)

Attachments at the right locations, but the link is wrong, the problem must be here. @cverna , we talked about this :slight_smile:

though I know @vivekanand1101 is currently quite busy

I am 10% busy, 90% frustrated with myself.

Login to comment on this ticket.

Metadata