Unable to view PDF's after upgrade to version 3

I recently upgraded my instance of ojs from 2.4.8.0 to version 3.0.2. I am having an issue where users are unable to download pdf’s even after enabling the pdf viewer plugin. It seems as the ojs system is unable to find the pdf’s inside the files directory. I verified that the files_dir is correctly set and that the proper permissions are in place on the file_dir folder.

Below are screenshots of the errors I receive when trying to view a pdf or download.

Thank you,

Angelo

1 Like

Hi @abalbuena,

The OJS 2.x to 3.x upgrade involves rearranging your files_dir to suit the way OJS 3.x stores files. If the upgrade script can’t perform this rearrangement, e.g. if file permissions don’t allow it, you should get warnings during the upgrade. Did you see any warnings? Did the upgrade process confirm at the end that the upgrade was successful?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

Yes the upgrade confirmed that it was completely successful. I actually made sure that the files_dir had the appropriate permissions prior to the upgrade. Besides giving the directory read/write to iusr account(windows), what other permissions does it need?

Thanks,

Hi @abalbuena,

It’s been a long time since I needed to work with Windows file permissions, but OJS simply needs to be able to read/write/move files and directories within the files_dir.

Of course, if you’re using the command-line upgrade tool, the permissions requirements will be different than when using the web-based upgrade tool.

One way to establish whether this happened or not is to look for a sample PDF filename. Can you find one and post it here?

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher,

I performed the upgrade via the web-based upgrade tool. When you say look for a sample PDF filename, how do I go about doing that?

Thanks

Hi @abalbuena,

Look for any .pdf file in your files_dir; let me know what the filename is.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

I searched my files_dir. I found the following pdf: 371-1614-1-rv.pdf

Thank you.

Hi @abalbuena,

This is still an OJS 2.x-style filename, which suggests that OJS wasn’t able to rename and rearrange the files directory as it needs to during the upgrade. To correct this, you’ll have to re-run the upgrade from a backup of your OJS 2.x database.

Regards,
Alec Smecher
Public Knowledge Project Team

@asmecher,

I finally got it to work by upgrading the database via the command line instead of the web browser.

Thanks for all of your help!

1 Like

can you help me about upgrading the database?