How to resolve this issue


#1

Fatal error: Call to a member function getId() on null in public_html/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php on line 68


#2

image
$cache =& $cacheManager->getFileCache(‘keywords_’ . AppLocale::getLocale(), $journal->getId(), array(&$this, ‘_cacheMiss’));


#3

HI @sciplatform

Could you post what software (OJS, OCS, OMP) and which version of it are you using? We need identify it so we may assist you.

Best
Israel Cefrin
Public Knowledge Project Team


#4

I am using OJS-2.4.8-2. I and when I am going to open the main website http://www.sciplatform.com/index.php the error will occur. Secondly, when I going to click on user home after login the above mention error will occur. Please advised as necessary.


#5

Hi
Could you please verify your webserver error log, it may contains more details about what triggers this error.

Best
Israel Cefrin
Public Knowledge Project Team


#6

Will you kindly let me know how to find web server error log?


#7

Sure.
A typical location for all log files is /var/log and subdirectories.
Try /var/log/apache/error.log or /var/log/apache2/error.log.
If the logs aren’t there, try running
$ locate error.log.

Best
Israel Cefrin
Public Knowledge Project Team


#8

Will you kindly explain the full procedure.? You mean I should login to Cpanel, file manager and I should search these or where to find.


#9

Is this a standard PKP plugin?


#10

I have download the error log file but it contains alot of text. Will you kindly let me know which should I share.


#11

The website was working fine almost 2 days ago. I found this error after login to admin account, site setting and unfortunately click on check for update. I am facing the issue since


#12

You may find a how to find PHP error’s log in this thread:

A question, haven’t you change your sidebar directly in DB, have you?

Best

Israel


#13

[03-Oct-2017 15:18:51 UTC] PHP Fatal error: Call to a member function getId() on null in /home/sciplatf/public_html/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php on line 68
[03-Oct-2017 15:23:04 UTC] ojs2 has produced an error
Message: WARNING: array_merge(): Argument #2 is not an array
In file: /home/sciplatf/public_html/classes/core/Application.inc.php
At line: 314
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.31
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.56-MariaDB-cll-lve
[03-Oct-2017 15:23:04 UTC] ojs2 has produced an error
Message: WARNING: Invalid argument supplied for foreach()
In file: /home/sciplatf/public_html/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php
At line: 114
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.31
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.56-MariaDB-cll-lve
[03-Oct-2017 15:23:04 UTC] ojs2 has produced an error
Message: CAUGHT EXCEPTION: Object of class Request could not be converted to string
In file: /home/sciplatf/public_html/lib/pkp/classes/handler/PKPHandler.inc.php
At line: 387
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.31
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.56-MariaDB-cll-lve
[03-Oct-2017 15:23:04 UTC] PHP Fatal error: Call to undefined method Journal::getLocalizedName() in /home/sciplatf/public_html/cache/t_compile/%%CF^CF1^CF1838C2%%articleFooter.tpl.php on line 36
[03-Oct-2017 15:36:55 UTC] NOTICE: Undefined variable: currentIssue (/home/sciplatf/public_html/plugins/generic/webFeed/WebFeedPlugin.inc.php:102)
[03-Oct-2017 15:36:55 UTC] PHP Fatal error: Call to a member function getId() on null in /home/sciplatf/public_html/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php on line 68
[03-Oct-2017 15:37:46 UTC] NOTICE: Undefined variable: currentIssue (/home/sciplatf/public_html/plugins/generic/webFeed/WebFeedPlugin.inc.php:102)
[03-Oct-2017 15:37:46 UTC] PHP Fatal error: Call to a member function getId() on null in /home/sciplatf/public_html/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php on line 68
[03-Oct-2017 15:41:33 UTC] ojs2 has produced an error
Message: WARNING: array_merge(): Argument #2 is not an array
In file: /home/sciplatf/public_html/classes/core/Application.inc.php
At line: 314
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.31
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.56-MariaDB-cll-lve
[03-Oct-2017 15:41:33 UTC] ojs2 has produced an error
Message: WARNING: Invalid argument supplied for foreach()
In file: /home/sciplatf/public_html/plugins/generic/recommendByAuthor/RecommendByAuthorPlugin.inc.php
At line: 114
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.31
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.56-MariaDB-cll-lve
[03-Oct-2017 15:41:33 UTC] ojs2 has produced an error
Message: CAUGHT EXCEPTION: Object of class Request could not be converted to string
In file: /home/sciplatf/public_html/lib/pkp/classes/handler/PKPHandler.inc.php
At line: 387
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.31
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.56-MariaDB-cll-lve
[03-Oct-2017 16:54:41 UTC] NOTICE: Undefined variable: currentIssue (/home/sciplatf/public_html/plugins/generic/webFeed/WebFeedPlugin.inc.php:102)
[03-Oct-2017 16:54:41 UTC] PHP Fatal error: Call to a member function getId() on null in /home/sciplatf/public_html/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php on line 68
[03-Oct-2017 16:54:50 UTC] NOTICE: Undefined variable: currentIssue (/home/sciplatf/public_html/plugins/generic/webFeed/WebFeedPlugin.inc.php:102)
[03-Oct-2017 16:54:50 UTC] PHP Fatal error: Call to a member function getId() on null in /home/sciplatf/public_html/plugins/blocks/keywordCloud/KeywordCloudBlockPlugin.inc.php on line 68


#14

I am not sure that I have change the sidebar in my data base. I can check and I will let you know if you guide me.


#15

Have you run a SQL statement or edit any table in your database with PHPMyadmin or by terminal? In ay case,I recommend to restore a previous backup to put your site back on track and verify what your update attempt may have broke in a local test version before you try update again.

Best
Israel Cefrin
Public Knowledge Project Team


#16

Thank you for your valuable suggestion but I have restore the backup of 20-sept-2017 but the issue is same. If any thing else please advised.


#17

Hi @sciplatform,

I suspect you’ve altered your sidebar block configuration to put the keyword block plugin onto the site-wide homepage. It’s not written to work this way – it expects to live within a journal’s context. If your site continued to operate despite this change being made, it’s possible that your cache directory contained outdated cache files that were taking effect rather than the database changes; flushing the cache files might cause this to suddenly appear, as the cache would be re-generated from the database table. I would suggest reviewing any changes you’ve made to your plugin_settings table for the keyword block plugin. Unfortunately we can’t walk you through this in detail.

Regards,
Alec Smecher
Public Knowledge Project Team


#18

From Asmecher suggestions, I have tried the following possible solutions.
I have tried delete the old files and upload the new one. The issue was same
I have tried to make the changes in the but all in vain.
I have removed the plugin and website is working fine.

Thank you israel and Asmecher