Event log and email log errors

Hi,
We have recently upgraded OJS-2.3.7 to OJS-2.4.7.1. After some problems which were more-less solved we’ve found the following two errors in Event log and email log entries, respectively:

Fatal error: Call to undefined method ArticleEventLogEntry::getLogLevel() in /home/iapchemo/public_html/pub/ojs/cache/t_compile/%%D4^D4C^D4C18A96%%submissionHistory.tpl.php on line 104

Fatal error: Call to undefined method ArticleEmailLogEntry::getAssocTypeLongString() in /home/iapchemo/public_html/pub/ojs/cache/t_compile/%%94^948^948B895A%%submissionEmailLogEntry.tpl.php on line 65

We cleared template cache but the same problem appears.

We tried to replace ArticleEventLogEntry.inc.php and ArticleEmailLogEntry.inc.php in /classes/articles/log folder with the same files from the old OJS-2.3.7 version.
This solved problem for Email log error. Now it looks completely ok.
However, replacing ArticleEventLogEntry.inc.php generates new error:

Fatal error: Call to undefined method ArticleEventLogEntry::setIsTranslated() in /home/iapchemo/public_html/pub/ojs/lib/pkp/classes/log/EventLogDAO.inc.php on line 101

We tried also to replace EventLogDAD.inc.php with the same file from the old OJS-2.3.7 version but this was not good since it only generated new errors which look more serious.

I would appreciate very much any advice.

Regards,
Zoran

Hi @zmandic,

Don’t mix OJS 2.4.x code with OJS 2.3.x code – it’s guaranteed to cause you problems. Restore your classes/artilces/log folder to the 2.4.x version before continuing.

Now check to see whether templates/sectionEditor/submissionHistory.tpl refers to getAssocTypeLongString or not. If it does, your code is incompletely upgraded; the OJS 2.4.7-1 code doesn’t refer to that anymore.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you Alec,

We restored OJS2.4 code back.
You are right about the template file. The template file was from the previous OJS-2.3.7 version. Namely, in the previous OJS2.3.7 version our programmer modified templates and styles folders in order to change the appearance of the website. After upgrading, what they did was just copy-pasting old templates and styles folders into new OJS2.4.7-1 version. That is the reason of the most of our issues so far. We solved most issues by just replacing corresponding files with the file from OJS2.4.7-1 package. This time we also returned the complete templates/sectionEditor folder and it proved useful.

We have a couple of additional problems which persist and I believe they are all caused by the old template files. I would appreciate it very much if you could look at them and maybe give as a hint how to solve it.

Problem 1. We continuously get the following error in the error_log file:

[07-Feb-2016 14:27:39 Europe/Berlin] PHP Fatal error: Call to a member function getRequest() on a non-object in /home/iapchemo/public_html/pub/ojs/plugins/generic/usageStats/UsageStatsPlugin.inc.php on line 223

We have copied GeoLiteCity.dat file in the plugins/generic/usageStats folder.

Problem 2. On the articleview page the pdf viewer’s height is very tiny. The width is ok. I’ve found the pdfViewer.tpl file and I can see there some percentages (99%) but I am not sure whether they affect the dimensions. On a related matter, Fullscreen link below the pdf viewer does not work.

Best,

Zoran

Hi @zmandic,

For the error…

[07-Feb-2016 14:27:39 Europe/Berlin] PHP Fatal error: Call to a member function getRequest() on a non-object in /home/iapchemo/public_html/pub/ojs/plugins/generic/usageStats/UsageStatsPlugin.inc.php on line 223

…perhaps @beghelli can help.

For the PDF viewer, I suspect there is a Javascript error or an old template causing problems there – but have you tried the PDF.js plugin included in newer releases of OJS? If you enable that (in Journal Management > System Plugins > Generic Plugins) it’ll replace the PDF viewer with a more modern PDF.js-based one.

For finding accidental modifications to the system, I’d suggest using a standard tool like diff to compare your installation against a fresh copy of OJS 2.4.7-1. This will tell you exactly what’s been changed.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @zmandic,

The error you have is fixed already, try applying these patches:

https://github.com/pkp/ojs/compare/ojs-2_4_7-1...ojs-stable-2_4_7.diff (for OJS code)
https://github.com/pkp/pkp-lib/compare/ojs-2_4_7-1...ojs-stable-2_4_7.diff (for PKP library code, inside lib/pkp)

That will fix the problem.

Cheers,
Bruno

Hi,
we are experiencing the same issue (message below) on 2.4.8-3. Is there a fix for our version?

Fatal error: Call to undefined method ArticleEventLogEntry::setIsTranslated() in EventLogDAO.inc.php on line 101

Hi @GustavoTonini,

That issue is already resolved in OJS 2.4.8-3 – is it possible you have some older code mixed in?

Regards,
Alec Smecher
Public Knowledge Project Team

Hey @asmecher,
probably not. Is there any “code signature” I can check to see if the problem is really in the code?

I checked the class ArticleEventLogEntry which extends EventLogEntry and the method setIsTranslated is there in the parent class.

Hi @GustavoTonini,

If it were me, I’d check what you already checked – that ArticleEventLogEntry extends EventLogEntry, which implements setIsTranslated. Are you sure there’s not another (older) installation of OJS 2.3.x lying around that might have caused that log entry?

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you @asmecher. There was another version of ArticleEventLogEntry.inc.php in the same folder causing the problem. I think it was result of a badly applied patch.