MuckRock / muckrock

MuckRock's source code - Please report bugs, issues and feature requests to info@muckrock.com
https://www.muckrock.com
GNU Affero General Public License v3.0
114 stars 22 forks source link

No document appears when clicking "view" on attached file. #180

Closed blipblitz closed 9 years ago

blipblitz commented 9 years ago

It's happening here. : https://www.muckrock.com/foi/new-york-16/wandering-dago-lawsuit-14067/#files.

Not sure where else.

allanlasser commented 9 years ago

I think the problem here is that it is an embargoed request, but the document viewer only knows how to display public documents. I'll look into some ways to fix this today.

On Dec 12, 2014, at 04:18, blipblitz notifications@github.com wrote:

It's happening here. : https://www.muckrock.com/foi/new-york-16/wandering-dago-lawsuit-14067/#files.

Not sure where else.

— Reply to this email directly or view it on GitHub.

allanlasser commented 9 years ago

Hm.. looks that this didn't fix it. Looks like it's a deeper problem about how files are assigned to both requests and communications. The problem is that these comms have an associated communication, but not an associated request so the call to foia.public_documents is empty. Any ideas @mitchelljkotler?

mitchelljkotler commented 9 years ago

As far as I can tell this has nothing to do with #151. Get public documents is filtering for public documents. Since these are embargoed, they are not public. Hence they do not show up. You could get all documents, including private ones, if the user is staff to get around this if necessary. All of these communications have both their comm and foia attribute set appropriately.

allanlasser commented 9 years ago

Hm, now templates are rendering the documents tab using foia.files.all (deferring whether or not to show files to the overall foia.is_viewable condition) and they're still not appearing. Not sure where to go from here.

allanlasser commented 9 years ago

@blipblitz encounter this anywhere else? It still exists on this page and I'm not sure why.

allanlasser commented 9 years ago

Found another occurrence of this. https://www.muckrock.com/foi/massachusetts-1/annual-wiretap-reports-2014-attorney-generals-office-15637/#files

allanlasser commented 9 years ago

Ok, I think I finally understand this now. Since DocCloud disables embedding for embargoed requests, the viewer isn't getting a file to display. So if the request is embargoed then I should both remove the viewer element and the option to 'view' from the little file objects in comms.

mitchelljkotler commented 9 years ago

that sounds right to me

On Fri, Jan 30, 2015 at 12:36 PM, Allan Lasser notifications@github.com wrote:

Ok, I think I finally understand this now. Since DocCloud disables embedding for embargoed requests, the viewer isn't getting a file to display. So I should both remove the viewer element from embargoed requests and removing the option to 'view' from the little file objects if the request is embargoed.

— Reply to this email directly or view it on GitHub https://github.com/MuckRock/muckrock/issues/180#issuecomment-72238896.