Fatal error: Uncaught Error: Call to a member function getOption() on null

i got an issue when creating a new journal and after finish entry the data and click save, it will appears notification: an unexpected error occured. Then when i refresh the page, suddenly the journal been created but when i want to edit the setting wizard, the page will just show loading on plugins and cannot save the edit on journal settings too. Then i went to check on the website link: https://ympn2.com/index.php/MARUTIKA and the page showed error like that.

Fatal error: Uncaught Error: Call to a member function getOption() on null in /home/u492949533/domains/ympn2.com/public_html/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.tpl.php:36 Stack trace: #0 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_resource_base.php(123): content_688a1ee1dba719_21678957() #1 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_template_compiled.php(114): Smarty_Template_Resource_Base->getRenderedTemplateCode() #2 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_template.php(217): Smarty_Template_Compiled->render() #3 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(238): Smarty_Internal_Template->render() #4 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/lib/vendor/smarty/smarty/libs/sysplugins/smarty_internal_templatebase.php(134): Smarty_Internal_TemplateBase->_execute() #5 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/classes/template/PKPTemplateManager.php(1372): Smarty_Internal_TemplateBase->display() #6 /home/u492949533/domains/ympn2.com/public_html/pages/index/IndexHandler.php(83): PKP\template\PKPTemplateManager->display() #7 [internal function]: APP\pages\index\IndexHandler->index() #8 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/classes/core/PKPRouter.php(334): call_user_func() #9 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/classes/core/PKPPageRouter.php(278): PKP\core\PKPRouter->_authorizeInitializeAndCallRequest() #10 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/classes/core/Dispatcher.php(165): PKP\core\PKPPageRouter->route() #11 /home/u492949533/domains/ympn2.com/public_html/lib/pkp/classes/core/PKPApplication.php(395): PKP\core\Dispatcher->dispatch() #12 /home/u492949533/domains/ympn2.com/public_html/index.php(21): PKP\core\PKPApplication->execute() #13 {main} thrown in /home/u492949533/domains/ympn2.com/public_html/cache/t_compile/00a0a0910209607cb33eb0fe6474f30ed7399ed7^e64e579388e5615e11e939b12134d6ae8679eba6_0.app.frontendpagesindexJournal.tpl.php on line 36

I am using OJS 3.4.0.8 version

Please help me, thank you

image

Hi @Chempian_Everesta_Su, what theme is this journal using? Is it using the latest version for OJS 3.4 from the plugin gallery?

hello thank you for replying, i dont know the theme used by the journal since it is showed “an unexpected error occured” and when i went to setting wizard to edit the theme, plugin, etc. It is just stuck on loading

I just realized that my website was infected with malware. Although I’ve already removed the suspicious files, it might still be affecting the site.

Hi @Chempian_Everesta_Su,

Is your files directory (see the files_dir setting in config.inc.php) inside the web root? If so, that’s an unsafe configuration and might explain the malware. Make sure your files directory is located outside the web root.

Regards,
Alec Smecher
Public Knowledge Project Team

Thank you for your reply. Based on my checking, it turns out that the file is indeed located in the web root. However, according to an explanation from ChatGPT, it should still be safe as long as it cannot be accessed directly through a browser — which would result in a 403 Forbidden error.

I also recalled something: when switching hosting plans, for example from Premium to Business, is it possible that the website data from the previous plan could get overwritten during the migration to the new plan?"

Hi @Chempian_Everesta_Su,

Unless you’ve explicitly taken steps to protect the contents of your files_dir from direct access using e.g. a .htaccess directive, it’s not safe to have it in the web root, regardless of what ChatGPT says. This is noted on the installation form, in the configuration file, and in other documentation.

I doubt that changing plans would overwrite data on your website, but only your host could tell you that for sure.

Regards,
Alec Smecher
Public Knowledge Project Team

"Does ‘web root’ mean the public_html directory? If so, where should I place the files_dir, considering that I’m using hPanel which states that files/folders are not allowed outside of public_html?"

Thank you, the issue has been resolved

1 Like

This topic was automatically closed after 12 days. New replies are no longer allowed.