Problems downloading files in OJS

Hi,
I have a question, why when I want to download a file from the platform as editor to revise me download it but when you open it appears to me that I have to select an encoding for the file (This happens with files in Word format (.doc))?

You could help me know that this happening

Thanks, greetings Yola

Hi @yola,

Typically this happens because there has been an accidental modification to one of the .php files, such as accidentally introducing a blank space to the top or bottom of a file. If you’ve made any modifications to the system, I’d suggest double-checking that no blanks have been added. (The standard diff tool can help with spotting these.)

If you’d like me to verify that this is the problem, PM me with a link to download one of the problematic files.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks for the answer, but I have not changed any files.
I put here the URL of a file that have the problem: http://cienciaspecuarias.inifap.gob.mx/editorial/index.php/Pecuarias/editor/downloadFile/4160/6633

Hi @yola,

I don’t have access to your editorial interface; you’ll have to download the file yourself and post it somewhere I can access.

Regards,
Alec Smecher
Public Knowledge Project Team

The problem is within the platform if you put the file on some other server side so you can download have not problem to open it, the problem is when you try to open downloaded from ojs.

Hi @yola,

Instead of trying to open the file with Word, try saving it to your local machine (from the same link that was giving you a prompt for encoding). If my hypothesis is correct, there will be an extra blank line at the start of the file, and that will be causing the problem. If you can provide me with the file, I can check whether that’s correct.

Regards,
Alec Smecher
Public Knowledge Project Team

Yes, this is the archive: http://cienciaspecuarias.inifap.gob.mx/editorial/4160-6633-1-SM.doc

Hi @yola,

As expected, trimming a few blank spaces off the beginning of the file results in it opening correctly (in LibreOffice) as a Word document. You’ll need to check to see if blank spaces have accidentally been added to something in your source code, in particular before the PHP header at the start of any PHP file:

<?php

…or after the PHP footer at the end of a file:

?>

Regards,
Alec Smecher
Public Knowledge Project Team

Ok thanks Alec Smecher, but it could help me to know what and where can I encpontrar the .PHP file with that problem, can you tell me specifically what it is?

Regards,Yola.

Hi @yola,

Unfortunately I can’t. Your best bet is to use the standard diff tool to compare your OJS installation against a fresh copy of the same version.

Regards,
Alec Smecher
Public Knowledge Project Team

Thanks asmecher for the help.
Regards,Yola.