Code $pubIdPlugins at home page OJS 3.1.1

Hi,
On home page of journal, on the top received code:

$pubIdPlugins = PluginRegistry::loadCategory(‘pubIds’, true); $templateMgr->assign(‘pubIdPlugins’, $pubIdPlugins);

How to remove this code?

Hi @Lazar_Stosic,

I suspect you’ve accidentally modified one of the OJS source files; this behavior doesn’t happen with OJS by default.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
In fresh copy of OJS I submitted old archive with quick submit plugin. Next day I receive this error on the top. Nothing was modified. By the way, this error is only in Current and Archive tab. In other is all OK. Any idea how to remove this error code on the top?
code
Also, when I try to change theme from Default Theme to Manuscript (Default child theme) nothing happened. There are no difference. Cannot upgrade Manuscript (Default child theme). In error_log received>

[30-May-2018 09:21:43 Europe/Belgrade] PHP Fatal error: Call to a member function getProductType() on string in /home/stranip/public_html/lib/pkp/classes/plugins/PluginHelper.inc.php on line 200

Any idea?

Regards,
Lazar

Hi @Lazar_Stosic,

I’m afraid I can’t replicate this locally. The error message you quote is probably associated with an attempt to upgrade a plugin e.g. via the plugin gallery. Is there anything else relevant in the log, especially from the time you saw the unexpected message?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
You are right. I tried to upgrade plugin theme from plugin gallery but cannot do that. After that I received this error and cannot remove the same. Probably I must to install again fresh copy of OJS. The question is it clever to upgrade theme again?
Regards,
Lazar

Hi @Lazar_Stosic,

Which plugin were you trying to upgrade?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
I tried to upgrade Manuscript (Default child theme) from Plugin Gallery. When click to upgrade button nothing happened and this theme is not active.
Regards,
Lazar

Hi @Lazar_Stosic,

Hmm, I’m not sure what’s happened locally, but I would suggest deleting that plugin and flushing your template cache (by removing cache/t_compile/*.php) to see if that resolves the issue. Please make a backup before doing this.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
I found the problem. The code was in
/pages/issue/IssueHandler.inc.php#L267

$pubIdPlugins = PluginRegistry::loadCategory(‘pubIds’, true);

$templateMgr->assign(‘pubIdPlugins’, $pubIdPlugins);

I deleted this code from there and everything work well.

Regards,
Lazar

Hi @Lazar_Stosic,

That code doesn’t appear near line 267 of pages/issue/IssueHandler.inc.php – are you sure there wasn’t a local change?

Regards,
Alec Smecher
Public Knowledge Project Team

Dear @asmecher,
This code was added to present statistics of reading articles. Somehow in latest OJS doesn`t work. In all previous version I use it and work very well.
The answer is that I added manually this code.
Thank you for assisting.
Lazar