Change galley PDF published OJS 3.1.x

Hi.
I have the new version of OJS (3.1.). And my question is how can I change a pdf attached as a galley that is already published. I have accessed the publication, I have removed the PDF and put the new one. But it continues showing the first PDF and the change will not be made.
What I can do?

Hi! @gardbeat
If you updated using change file option then it must get updated however you may not able to see immediately at front end due to cached file. Delete cookies/cached file of your browser after updating file and you will able to see it.

1 Like

Hi @aabahishti,

Hi. Clear the cache of both the OJS module and the hosting and the first pdf is maintained and it does not update to be displayed on the web. Thank you and I look forward to your response.

Hi @gardbeat
Cookies and cached files of your browser (in your PC) need to be deleted (not in hosting). Alternatively, you may open in incognito window (if using google chrome) or InPrivate Window (if using edge).

Hello @aabahishti,

I have also tried incognito mode and it does not work. So the data is not finished loading. What can be due?

I can confirm the issue. It’s not local or server’s caching… it’s some more wired.
I checked it in @gardbeat installation that is a OJS 3.1.1 with a multilang:

  1. ojs you upload the file to replace your galley (now you have an specific button for this).
  2. still as an admin, I try to set the metadata (step 2, file name fields) but info is not stored.
    My guess is, as far as metadata is incomplete, the form wizard don’t let you go to step 3 and you are stacked.

The filename was as challenging as “admin, 12.bar.22.yasmine.def.2017.web.pdf”… just in case it can be related.

Here you have a video showing the issue: https://streamable.com/6cq3t

I will try to reproduce in my OJS to be sure is a general bug.

I reproduced the issue in my local installation with OJS 3.1.1-2 (that is -3).
Video example: https://streamable.com/jdb11

Log (anonymized IPs and domains) shows the following error:

[Thu Jul 05 11:22:46.441766 2018] [:error] [pid 46603] [client 1.2.3.4:33036] PHP Warning:  move_uploaded_file(/var/www/files/journals/1//articles/43/submission/proof/43-1-525-1-10-20180705.png): failed to open stream: Permission denied in /var/www/html/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://myjournal.org/isogloss/workflow/index/43/4
[Thu Jul 05 11:22:46.441872 2018] [:error] [pid 46603] [client 1.2.3.4:33036] PHP Warning:  move_uploaded_file(): Unable to move '/tmp/phpgOijed' to '/var/www/files/journals/1//articles/43/submission/proof/43-1-525-1-10-20180705.png' in /var/www/html/lib/pkp/classes/file/FileManager.inc.php on line 119, referer: http://myjournal.org/isogloss/workflow/index/43/4
[Thu Jul 05 11:22:46.460370 2018] [:error] [pid 46603] [client 1.2.3.4:33036] PHP Fatal error:  Call to a member function getFileId() on null in /var/www/html/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php on line 1029, referer: http://myjournal.org/isogloss/workflow/index/43/4

Permissions in ./files/journals/1//articles/43/submission/proof/ looks right (even excessive) to me:

2374219      4 drwxr-xr-x    2 root     root        4.0K Jul  2 19:03 .
2364893      4 drwxrwxr-x    9 apache   apache      4.0K Jul  2 19:03 ..
2364892      0 -rwxrwxr-x    1 apache   apache         0 Dec 31  2017 43-1-461-1-10-20171231.pdf

/etc/apache2/httpd.conf define “User apache” and “Group apache”.

Starting a deeper debug process but… @asmecher or so, do you know if something similar reported somewhere else?

More info:

  1. upload works fine with regular article’s submit.
  2. Logs don’t show more info than the one posted

First round:

  1. permissions reviewed
  2. “upload_tmp_dir” set to “/tmp”

I will try moving “tmp” to an specific folder… and enable debug variables to follow ojs’ trace.

I didn’t check it well enough because setting ./private folder to “774” and changing ownership to “apache:apache” fixed the issue.

On a different installation I realized “proof” folder had the wrong ownership.

@gardbeat, we need to check permissions in your installation.

Hi @marc, I have a problem trying to migrate OJS 2.4 to OJS 3.1. I am using Linux as Operating System. I think that my problem could be in the permissions on submission_files, I set the following permission on submission_files

sudo chown -R www-data:www-data submission_files/

and the permission was:

sudo chmod -R 774 submission_files/

When I try to upgrade with php tools/upgrade.php script, I get the following error:

PHP Fatala error: call to a memeber function getFileId() on null in /var/www/html/ojspujcali/lib/pkp/classes/submission/PKPSubmissionFileDAO.inc.php

could you help me? I dont know if the permissions that i am giving are enough.

PD. I have not apache user in my OS.

thank you