Problems with loading plugin setting page ojs3

Hi
I’m an newbie in ojs
I’m working on plugin there have to be upgrade to ojs 3.
The problem is the setting page for the plugin before the setting page was loaded like this
parent::__construct($this->getTemplateResource(‘settingsForm.tpl’))
I changes that to :
parent::__construct($plugin->getTemplateResourceName(false) . ‘:templates/settingsForm.tpl’);

But I get this error :
PHP Warning: Smarty error: unable to read resource: "plugins/plugins/generic/myplugin/generic/myplugin:templates/settingsForm.tpl" in /var/www/ojs/lib/pkp/lib/vendor/smarty/smarty/libs/Smarty.class.php

What is the right way to load a setting page for a custom plugin?

Hi @maja

With what OJS version you are working with?

Hi @Vitaliy

ojs-3.1.1-4

As I remember in 3.1.1-4 you should use something like:

parent::__construct($plugin->getTemplatePath() . 'settingsForm.tpl');

There were some changes introduced in the code associated with template paths in the development OJS version.

1 Like

Hi @Vitaliy

thank you very much for your answer, I’m very grateful

Maja