Fatal Error when displaying articles in OJS 2.4.7-1

We have upgraded OJS-2.3.7 to OJS-2.4.7-1 by applying the patch. After some initial problems the upgrade seemed to be correctly done. We created new SQL database for OJS-2.4.7 in order to keep the old version installed until we are certain everything works correctly.
However, when trying to display articles by clicking corresponding links in TOC (either PDF link or the title of the article) the Fatal error appears:

Fatal error: Call to undefined method PublishedArticle::getDOI() in /home/iapchemo/public_html/pub/ojs247/cache/t_compile/%%28^280^280EE005%%dublincore.tpl.php on line 77

Error log in ojs folder does not reveal anything more.
The error is not related to file permission since the old OJS-2.3.7 works correctly.

I would appreciate it very much if anybody could suggest what to do!

We managed to solve this problem by replacing %%28^280^280EE005%%dublincore.tpl.php file from another correct installation. However, another problem waited for us. Now we obtain the following fatal error:

Fatal error: Call to a member function getData() on a non-object in /home/iapchemo/public_html/pub/ojs247/classes/plugins/PubIdPlugin.inc.php on line 244

Shall we replace this file also?
Thank you for your help in advance!


Hi @zmandic,

The best solution is actually to delete all .php files from cache/t_compile and ensure that OJS is re-generating them as needed. Your template cache probably contains old content from your previous version. One reason this might happen is if your file permissions aren’t set to permit OJS to automatically re-generate the files.

As for the second error message, perhaps @bozana has a quick idea?

Alec Smecher
Public Knowledge Project Team

Thank you very much Alec for your response.
Our developer solved also the second error. I do not know how he did it but I’ll find out and post it here later today.


@zmandic How you solved the second issue? A had one similar behaviour after update ojs 2.3.8 to 2.4.8:

When i click in any pdf of one journal, a had a blank screen and this error on apache log:

[Wed Aug 03 15:46:24.804052 2016] [:error] [pid 1995] [client] PHP Fatal error: Call to a member function getData() on null in /var/www/ojs-2.4.8/classes/plugins/PubIdPlugin.inc.php on line 244, referer: http://server.com.br/index.php/vertices/issue/view/183

I cannot remember how we solved this particular problem but all our problems after upgrading arose because we wanted to keep old OJS237 template and classes files. We wanted to keep them because they were modified in OJS237 in order to give our website a different appearance. Our idea was not good since it gave us a lot of troubles in the new installation. Now we managed to solve most of the problems with replacing corresponding problematic files (publdPlugin.inc.php in your case) with the fresh files from the new OJS version.
Therefore I would suggest that you unzip OJS248 and then to find there the file in question and copy it to the designated folder. I hope this will solve the problem.

1 Like

solved adjusting my customized ojs/templates/article/article.tpl (or only copy a new one article.tpl from ojs 2.4.8).