OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



View Issue with wrong headers?

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

View Issue with wrong headers?

Postby luiz_borges » Thu Jan 17, 2013 3:37 am

I just started using the View Issue feature of the new version of OJS, however, I've noticed that it is not working on Chrome see the links below:
This works: http://seer.fclar.unesp.br/itinerarios/ ... /5608/4413
This doesn't: http://seer.fclar.unesp.br/itinerarios/ ... ssue/451/2

Inspecting the links are called on by the pdfObject, I noticed that the first one shows normally on browser, but the second one tries to be downloaded.
This works http://seer.fclar.unesp.br/itinerarios/ ... /5608/4413
This doesn't: http://seer.fclar.unesp.br/itinerarios/ ... File/451/2

I'm guessing this has something to do with file headers. Is there a bug report open for this? I guess the patch would be simple to implement.

EDIT: I tested the links with http://web-sniffer.net/ and confirmed that indeed the headers are different one have "Content-Disposition: attachment;" the other "Content-Disposition: inline;"
luiz_borges
 
Posts: 29
Joined: Tue Jun 30, 2009 1:44 pm
Location: Araraquara-SP / Brasil

Re: View Issue with wrong headers?

Postby luiz_borges » Thu Jan 17, 2013 6:05 am

I solved the issue. I edited the file /pages/issue/IssueHandler.inc.php and changed:
Code: Select all
         return $issueFileManager->downloadFile($galley->getFileId(), null, $inline);

to
Code: Select all
         return $issueFileManager->downloadFile($galley->getFileId(), $inline);


The downloadFile function of issueFileManager takes just two parameters. I think it is necessary to create a bug report for this.
luiz_borges
 
Posts: 29
Joined: Tue Jun 30, 2009 1:44 pm
Location: Araraquara-SP / Brasil

Re: View Issue with wrong headers?

Postby JasonNugent » Thu Jan 17, 2013 6:36 am

Hi Luiz,

Thanks for the bug report and the fix. I've filed a bug report and also committed fixes to our OJS branches that use this feature.

http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=8084

Cheers,
Jason
JasonNugent
Site Admin
 
Posts: 791
Joined: Tue Jan 10, 2006 6:20 am


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 12 guests