PHP Fatal error: Uncaught Error: Call to a member function getOption() on null, after UPGRADE from 3.1.2-1 to 3.2.1-4

Hello,
happened this error on log file after upgrade OJS from 3.1.2-1 to 3.2.1-4.
The upgrade finished with a “Successful…” message.
I found 2 other similar topics, but their resolutions don’t are usuful for me and those are closed.

The full frase error message is:

[error] 156071#156071: *1 FastCGI sent in stderr: "PHP message: PHP Fatal error: Uncaught Error: Call to a member function getOption() on null in …/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.php:36

What could be the cause of this?
I’m think it can be some orphan data in database.

Thanks if someone can help. =)

Did the upgrade finished with a “Successful…” message?

If yes, try to clean cache folder manually or as follows:

$ find /var/www/html/cache -type f -delete
$ ls -lisaR /var/www/html/cache

Cheers,
m.

1 Like

Yes, the upgrade finished with succesful.

Nice to see your suggestion about apache’s cache, but I’m usuing nginx. I still didn’t find where nginx’s cache stay.

This is not for apache’s cache… it’s for OJS one.
You will find the “cache” folder in the root path of your ojs installation.

Hello @marc ,
Today I did how you suggested, cleaned correctly the files on cache’s folders with your script, but unfornetly didn’t change nothing.

Hi. I discovered this error was caused by upgrade from 3.1.2-1 to 3.2.1-4 (not from 3.2.1-4 to 3.3.0-8), so I updated the title of this help requesting.

I need to upgrade OJS from 3.1.2-1 to 3.3.0-10, but it’s not possible because the table ‘authors’ on 3.1.2-X hasn’t the column ‘publication_id’, so I upgraded first to 3.2.1-4 with success message and the main page is ok, but when enter in some magazine the pages it’s broken.

I need help. :worried:

Sorry @murilodbva but I got a little lost with the changes.

Could we take this as a fresh start or it means you got errors during the 3.1 to 3.2 upgrade and now you are getting errors with the jump to 3.3.0-10?

Anyway, when you got errors during an upgrade the recommendation is roll-back and recover your former version. This recommendation is based in the fact that “half-upgraded” versions left OJS in a random status and is very difficult (if not impossible) to discover what is failing and how to fix it.

So please, roll back to your first version in your production system and let’s talk about your error when you have a testing version up and running.

Cheers,
m.

Very thanks for keep trying to help. :grinning:
Responsing your question: it means I got errors during the 3.1 to 3.2 upgrade.
So I resolved all them roll-backing and recovering the database all time whem them appears, until have a how-to upgrad. So I upgraded with success (no errors on terminal) as I described in this post: https://forum.pkp.sfu.ca/t/upgrade-ojs-3-1-2-1-to-3-2-1-4-successfully-upgraded/69850/9
The error appears just in the log error, when open some maganize. Doesn’t appears when open the main page.

Now I’m thinking the problem can be caused when I deleted the table ‘submission_galley_settings’ on the 1º ERROR (on link I posted). I’m now investing it.

Hello @marc , finally I found a solution. :star_struck:
It really was caused by the 1° solution on the upgrade. It was a wrong solution.
Now I have a real solution.
I posted in the link above this message. :point_up_2:

1 Like