Many article published from various journals are ok but now we have found that some published articles are not accessible. When you click on article title from a published issue a 500 error was found.
Reviewing log messsage we found this error for some articles
PHP Fatal error: Uncaught Error: Call to undefined method Article::getGalleys() in /ojs/pages/article/ArticleHandler.inc.php:102\nStack trace:\n#0 /ojs/lib/pkp/classes/core/PKPRouter.inc.php(390): ArticleHandler->view(Array, Object(Request))\n#1 /ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(232): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#2 /ojs/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPPageRouter->route(Object(Request))\n#3 ojs/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))\n#4 /ojs/index.php(68): PKPApplication->execute()\n#5 {main}\n thrown in /ojs/pages/article/ArticleHandler.inc.php on line 102
As an editor I can access to this submission and view pdf galley from production tab.
Some other articles shows an error about can’t issue->getYear() but we access to this article clicking on this issue.
Uncaught Error: Call to a member function getYear() on null in /ojs/plugins/generic/googleScholar/GoogleScholarPlugin.inc.php:118\nStack trace:\n#0 /ojs/lib/pkp/classes/plugins/HookRegistry.inc.php(107): GoogleScholarPlugin->articleView(‘ArticleHandler:…’, Array)\n#1 /ojs/pages/article/ArticleHandler.inc.php(196): HookRegistry::call(‘ArticleHandler:…’, Array)\n#2 /ojs/lib/pkp/classes/core/PKPRouter.inc.php(390): ArticleHandler->view(Array, Object(Request))\n#3 /ojs/lib/pkp/classes/core/PKPPageRouter.inc.php(232): PKPRouter->_authorizeInitializeAndCallRequest(Array, Object(Request), Array, false)\n#4 /ojs/lib/pkp/classes/core/Dispatcher.inc.php(134): PKPPageRouter->route(Object(Request))\n#5 /ojs/lib/pkp/classes/core/PKPApplication.inc.php(247): Dispatcher->dispatch(Object(Request))\n#6 /projectes/raco-pro-new/ojs/index.php(68): PKPApplication->execute()\n# in /ojs/plugins/generic/googleScholar/GoogleScholarPlugin.inc.php on line 118, referer: https://myojs.com/index.php/myjournals/issue/view/2378
If I change ther third param (cache) from true to false it works and I can view articles from issue page.
I tried to clear cache as site admin but cache is “still alive”.
; Choose the type of object data caching to use. Options are:
; - memcache: Use the memcache server configured below
; - xcache: Use the xcache variable store
; - apc: Use the APC variable store
; - none: Use no caching.
object_cache = none
; Enable memcache support
memcache_hostname = localhost
memcache_port = 11211
; For site visitors who are not logged in, many pages are often entirely
; static (e.g. About, the home page, etc). If the option below is enabled,
; these pages will be cached in local flat files for the number of hours
; specified in the web_cache_hours option. This will cut down on server
; overhead for many requests, but should be used with caution because:
; 1) Things like journal metadata changes will not be reflected in cached
; data until the cache expires or is cleared, and
; 2) This caching WILL NOT RESPECT DOMAIN-BASED SUBSCRIPTIONS.
; However, for situations like hosting high-volume open access journals, it’s
; an easy way of decreasing server load.
;
; When using web_cache, configure a tool to periodically clear out cache files
; such as CRON. For example, configure it to run the following command:
; find …/ojs/cache -maxdepth 1 -name wc-*.html -mtime +1 -exec rm “{}” “;”
web_cache = Off
web_cache_hours = 1
Hi,
we review configuration file and has no cache defined.
We have deleted cache files in cache dir and OJS admin has clear data and template cache. After this we try to access to some articles and a 500 error appers.
If i change cache parameter on initialize funtion in ArticleHandler.inc.php to get publishedArticles and issues calling getPublishedArticleByBestArticleId and getById the article is showed.
I’m not sure how cache is working because cleanin the cache it doen’t work but if i force in article template not to use cache we can access to articles.
Have you been using numeric public identifiers for articles? If so, then it’s possible that those are conflicting with OJS’s built-in identifiers. Change your public identifiers so that they can’t collide with OJS’s identifiers by adding something non-numeric to them.
Regards,
Alec Smecher
Public Knowledge Project Team
I’m afraid I’m having a hard time determining what’s happening by looking at the code. I’d suggest digging deeper into the PublishedArticleDAO to find out what SQL queries it’s using to look up the articles you’re viewing. With object_cache etc. disabled, there should actually be no caching present, so resetting the file cache etc. shouldn’t have any effect.
Regards,
Alec Smecher
Public Knowledge Project Team
Unfortunately I haven’t been able to replicate the problem myself, so if anyone is able to dig a bit deeper in the code to provide more information, I’d be very interested.
Thanks,
Alec Smecher
Public Knowledge Project Team