[SOLVED] Custom Block Manager didnt save

My OJS is version 3.1.1.0, when i add some Block (in Custom Block Manager Plugin) and save it, is loading forever and it wont save.
this my error log:

[Mon Apr 30 14:33:02.322355 2018] [proxy_fcgi:error] [pid 1163] [client 103.16.133.155:64156] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getSetting() on string in /var/www/clients/client1/web9/web/plugins/generic/customBlockManager/controllers/grid/form/CustomBlockForm.inc.php on line 90\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:34:15.209148 2018] [proxy_fcgi:error] [pid 760] [client 103.16.133.155:64295] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getSetting() on string in /var/www/clients/client1/web9/web/plugins/generic/customBlockManager/controllers/grid/form/CustomBlockForm.inc.php on line 90\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:37:05.946393 2018] [proxy_fcgi:error] [pid 1162] [client 103.16.133.155:64457] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getProductType() on string in /var/www/clients/client1/web9/web/lib/pkp/classes/plugins/PluginHelper.inc.php on line 200\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:38:23.805621 2018] [proxy_fcgi:error] [pid 1163] [client 103.16.133.155:64458] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getProductType() on string in /var/www/clients/client1/web9/web/lib/pkp/classes/plugins/PluginHelper.inc.php on line 200\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:38:23.813777 2018] [proxy_fcgi:error] [pid 1956] [client 103.16.133.155:64460] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getProductType() on string in /var/www/clients/client1/web9/web/lib/pkp/classes/plugins/PluginHelper.inc.php on line 200\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:38:24.130092 2018] [proxy_fcgi:error] [pid 1472] [client 103.16.133.155:64459] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getProductType() on string in /var/www/clients/client1/web9/web/lib/pkp/classes/plugins/PluginHelper.inc.php on line 200\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:40:20.368865 2018] [proxy_fcgi:error] [pid 2424] [client 103.16.133.155:64461] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getProductType() on string in /var/www/clients/client1/web9/web/lib/pkp/classes/plugins/PluginHelper.inc.php on line 200\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:40:48.501513 2018] [proxy_fcgi:error] [pid 2160] [client 103.16.133.155:64496] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getSetting() on string in /var/www/clients/client1/web9/web/plugins/generic/customBlockManager/controllers/grid/form/CustomBlockForm.inc.php on line 90\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:41:50.279035 2018] [proxy_fcgi:error] [pid 2455] [client 103.16.133.155:64562] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getSetting() on string in /var/www/clients/client1/web9/web/plugins/generic/customBlockManager/controllers/grid/form/CustomBlockForm.inc.php on line 90\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:47:35.538383 2018] [proxy_fcgi:error] [pid 3039] [client 103.16.133.155:64750] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getSetting() on string in /var/www/clients/client1/web9/web/plugins/generic/customBlockManager/controllers/grid/form/CustomBlockForm.inc.php on line 90\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website
[Mon Apr 30 14:49:43.046774 2018] [proxy_fcgi:error] [pid 3039] [client 103.16.133.155:64900] AH01071: Got error ‘PHP message: PHP Fatal error: Call to a member function getSetting() on string in /var/www/clients/client1/web9/web/plugins/generic/customBlockManager/controllers/grid/form/CustomBlockForm.inc.php on line 90\n’, referer: http://jurnal.htp.ac.id/index.php/keskom/management/settings/website

Hi,

I have the same OJS version and I have the same problem and the same message in error log file.

Best regards.
Helene

1 Like

Hi all,

See Getting fatal PHP error when using Custom Block Manager to create new blocks - #42 by loveleentak.

Regards,
Alec Smecher
Public Knowledge Project Team

Thans its work Now [SOLVED]

Hi,

It also works for me now.
Thanks.

Best regards.
Helene

Hi, I created a new Block (on sidebar) with php code but I have 200 journals, How can I add this block by default in all the view journals on the sidebar?

Do I need to add this block one by one?

This code only print a setting:

 {if $currentJournal->getSetting('var1') != 0}
     <span class="title">VAR1</h2></span>
     {$currentJournal->getSetting('var1')}
 {/if}

can I write the code in any tpl with similar code … if myblock == enable then print block; ??

Thanks.

Hi @xavi,

If you want to force the block for all your journals, you can try overriding the getEnabled, getBlockContext, and getSeq functions in the plugin class.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,
Thank you, but I would like to know if I have 200 journals, do I need to install one by one or Can I install and activated this plugin for all my journals ?

Regards,
Xavi

Hi @xavi,

My post above was an answer to that question. Usually you would have to enable the plugin for each journal and place it on each journal’s sidebar, but by overriding the plugin’s functions you can achieve the same thing via coding.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

Thank you, it was perfect.

Regards,
xavi.

Dear PKP,

I am facing similar issues when saving the logo/images under custom block manager (the loading takes forever), how do I paste the patch? Should I paste this patch CustomBlockManagerPlugin.inc.php, in every logo source code that I want to add, or should I delete the existing custom block manager? and create new custom block manager? and paste this patch in the source code? Will there be any risk associated with loss of data when pasting this patch in source code?

Thank You

Hi @Ash_Bakri,

This is an older post. Can you create a new post describing your issue, please? Feel free to link back to this post if it is similar to the problem you are facing. And please indicate which version of OJS and the plugin that you are using.

Best regards,

Roger
PKP Team