[OJS 3.3] Custom Locale Plugin fatal error

Greetings,

I’ve been using the Custom Locale Plugin to edit the locale file but i came with this error when i tried to activate it on the homepage (I’m running multiple journals on the same installation).
This error only happened when i activated on the main homepage, not the homepage of the individual plugins.
Is there a way to fix this error and if not is it possible to manually deactivate the plugin through the server so that i can still use it on the individual journals?

Best regards,
José Nobre

**Fatal error** : Uncaught Error: Call to a member function getId() on null in /var/www/revistas-prod/ojs/plugins/generic/customLocale/CustomLocalePlugin.inc.php:32 Stack trace: #0 /var/www/revistas-prod/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(69): CustomLocalePlugin->register('generic', 'plugins/generic...', NULL) #1 /var/www/revistas-prod/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php(142): PluginRegistry::register('generic', Object(CustomLocalePlugin), 'plugins/generic...', NULL) #2 /var/www/revistas-prod/ojs/lib/pkp/classes/core/Dispatcher.inc.php(133): PluginRegistry::loadCategory('generic', true) #3 /var/www/revistas-prod/ojs/lib/pkp/classes/core/PKPApplication.inc.php(362): Dispatcher->dispatch(Object(Request)) #4 /var/www/revistas-prod/ojs/index.php(68): PKPApplication->execute() #5 {main} thrown in **/var/www/revistas-prod/ojs/plugins/generic/customLocale/CustomLocalePlugin.inc.php** on line **32**

Hi @josenobre

The plugin is trying to call getId() on a context object, and because this is on the front home page, there is no context object so the error occurs. Have you tried disabling the plugin in Administration → Site Settings? You can keep it enabled for each journal.

Cheers
jason

Hi @jnugent

Thank you for your response.
I receive the same error when trying to go to the Administration.
Is it possible to delete the plugin changes so that i can make a fresh new installation?

Best regards,
José Nobre

Hi @josenobre

you can clean out the settings in the versions and plugin_settings tables just for that specific plugin (don’t empty the whole table please) and then re-enable it just for your journals.

Cheers,
Jason

1 Like

Hi @jnugent

How can i get to those settings?
Is it on the server or is it on the website?

Best regards,
José Nobre

Hi @josenobre

You’ll need a tool like PHPMyAdmin to look into the database directly. It is delicate work - if you aren’t sure, please ask your systems administrator and of course make backups before proceeding.

Cheers,
Jason

Hi @jnugent

Thank you for the advice, before proceeding i wanted to make sure if there is no other solution.
Is there anything else that i could do to solve the problem?

Best regards,
José Nobre

Hi @josenobre

You can completely remove the plugin by deleting the plugins/generic/customLocale directory, but that won’t fix the problem in the sense that you’ll be able to reinstall it because the database settings will remain. If you remove the plugin that way your site will work but you just won’t be able to use the plugin again.

Jason