Problems upgrading OJS to 3.0.2 via git and full package

Hi everyone,
I am trying to update my OJS 3.0.1 to the latest version (3.0.2).

I have made local changes in the templates files but I haven’t got installed by git, so the first method that I tried was the full package and then, when everything will be installed, I will modify again the templates. To upgrade via full package I follow the instructions in docs/UPGRADE: copy the, /public and the files folder, and then I replace the directories. However, it didn’t works fine because in the installation screen, at the top, there was this error messages.

I decided that I could try to install OJS via git to solve this problems and be easier to update in the future. For that, I followed the instructions in PKP wiki. Nothing got an error, everything perfect. However, when I open the website I can only see a white page and I can’t access to any URL that I have in the history. Then I remember an error: I didn’t upgrade the database. For that I followed the instructions in docs/UPGRADE: “installed” = on, then run the upgrade script (without any error) and the “installed” = off. But everything was the same: white page. I look in the log of the upgrade script to check something wrong and I find something that I don’t understand:

Successfully upgraded to version

I understand reading this that the script downgrade my database from 3.0.1 to 3.0.0… But I don’t understand why, because installing OJS via should install the latest version, no? I think that it could be solved with git rebase, but it doesn’t works:

$ git rebase --onto ojs-3.0.2-0 ojs-3.0.0-0
fatal: Needed a single revision
Does not point to a valid commit:

Could anyone help me with that?
Thanks in advance!
Regards, Iván

Unless you are familiar with git (or eager to learn), I would recommend the “Full Package” install, with the manual modifications after the fact (as you initially described).

The error messages you linked to can be avoided by disabling PHP Strict Standards and disabling deprecated warnings:

If you want to transition to Git, you’ll want to checkout the git commit which best corresponds with your install. If you installed OJS 3.0.1 from the Full Package, that is probably the git tag ojs-3_0_1-0. You’ll want to resolve and commit any differences between your intentional changes and that checkout in both the application and the submodules (lib/pkp, for example). After that, you should be able to rebase the application and submodules.

Thank you for your response, @ctgraham. Excuse me the delay in my response, I have had to resolve an important problem occurs in the website where I works: someone hacked us (it isn’t the first time). At the bottom of this message I explain briefly the cause, because it is related with OJS :sweat:

I have used git before, I am not an expert, but I want to improve my knowledge and my experience with git, so I am not worry to use it :slight_smile:

What you have said about disable Strict Standards remember me that I can’t use PHP 7.0 with my OJS installation, because it shows me a white page in which I can’t do anything.

I finally install again OJS via git, but it install OJS 3.0.1 and not 3.0.2. I don’t understand why, but I have doubts. I am trying to make a git rebase, using ojs-3_0_2-0 as the new version and ojs-3_0_1-0 as origin, but it didn’t works. If if execute git rebase --onto ojs-3_0_2-0 ojs-3_0_1-0, I get the next error:

fatal: Needed a single revision
invalid upstream ojs-3_0_1-0

What could it be happening? If nobody knows how could be solved it, I will try to install again OJS 3.0.2 via git.

I am going to open a new message about the security issue that I am going to comment, but I want to speak about it briefly in this message because it is very important to consider. I have confirmed with my hosting service that someone upload a script inside a phtml file and it was auto-executed, infecting all my sites (not only the OJS installation, even a Wordpress installation and an empty subdomain). I have read “Security issue: Hacking via submission in OJS 2.4.8” and, reading exactly the first message of Palmpilic, we have suffered in the same way: hacker registration that upload an phtml to files dir and then generate html, php and txt files similar. I will post another topic for that, but I would like that you consider this because it happens to me with OJS 3.0.1.

Thanks in advance. I hope we could solved this soon.


Did you fork the pkp/ojs repository to your own, and checkout that? Or did you checkout the pkp/ojs repository directly?

Do you maintain many local modifications to the code? If so, do you modify both the OJS application and the shared library (lib/pkp)?

What branches and tags are available in your current repository?

git branch -a
git tag

I fork the pkp/ojs repository. But there is something that I don’t understand. I fork the main repository but the version that I read in my docs/README is 3.0.0. And then, when I am going to compare the master branchs of pkp/ojs and my fork, there isn’t nothing to be updated. I also haven’t got the branches 3.0.1 and 3.0.2 that I already see in the pkp/ojs.

I do modifications to the code mainly in the “templates” folder, I remember that I modify this files in both. But I am not worried about because I installed again via git and in a near future I will make it again.

If I execute git branch -a, I get the next results:
* master remotes/origin/712-fix remotes/origin/HEAD -> origin/master remotes/origin/debian remotes/origin/master remotes/origin/ojs-alpha-3_0 remotes/origin/ojs-archive-2_2 remotes/origin/ojs-archive-2_3_1 remotes/origin/ojs-dev-2_4 remotes/origin/ojs-stable-2_3 remotes/origin/ojs-stable-2_4_5 remotes/origin/ojs-stable-2_4_6 remotes/origin/ojs-stable-2_4_7 remotes/origin/ojs-stable-2_4_8 remotes/origin/ojs-stable-3_0_0 remotes/origin/pre-ui-merge remotes/origin/revert-612-password-emailing-is-unsafe

And, if I execute git tag:
ojs_2_3_5-0 ojs_2_3_6-0 ojs_2_3_7-0 ojs_2_3_8-0 ojs_2_4_0-0 ojs_2_4_1-0 ojs_2_4_2-0 ojs_2_4_3-0 ojs_2_4_3rc1 ojs_2_4_4-0 ojs_2_4_4-1 ojs_2_4_5-0 ojs_2_4_6-0 ojs_2_4_7-0 ojs_2_4_7-1 ojs_2_4_8-0 ojs_2_4_8-1 ojs_3_0_0-0 ojs_3_0a1 ojs_3_0b1 ojs2-base-2_2_2 ojs2-base-2_2_3+-debian start

What do you think about it? If this is very strange or hard to solve I could try to re-fork and install it again, don’t you think?

Regards, Iván

P. S. The strange thing is that in the control panel of OJS I read that I am in the version 3.0.1, and not in 3.0.0.

If you’ve forked the pkp/ojs repo to your own, e.g. ivanhercaz/ojs, your forked repo will not automatically be aware of changes upstream.

A typical way to manage this is to attach your cloned repo to both your fork and to the upstream source.

git clone my-clone
cd my-clone
git remote add upstream

Now I have cloned my fork of OJS into “my-clone” locally. I’ve added remote access to PKP’s OJS repository as “upstream”.

Now I can make “my-clone” aware of the latest changes in PKP:

git fetch upstream

Once “my-clone” is aware of PKP’s changes, I can use them in git commands, such as merge or rebase.