Enable usage statistics plugin on OJS 3.3.0-10

Hello. Another question, sorry.

OJS 2.4 → OJS 3.1 → OJS 3.3.0-10

We want enable, as admin, the usage statistics plugin, but in web we can’t, checkbox is disabled

Captura de pantalla -2022-06-03 07-35-06

> SELECT * FROM plugin_settings WHERE setting_name='enabled' AND plugin_name='UsageStatsPlugin';
+------------------+------------+--------------+---------------+--------------+
| plugin_name      | context_id | setting_name | setting_value | setting_type |
+------------------+------------+--------------+---------------+--------------+
| usagestatsplugin |          0 | enabled      | 0             | bool         |
+------------------+------------+--------------+---------------+--------------+
1 row in set (0.001 sec)

How can i enable it?

Thank you.

That’s a site-wide plugin, so needs to be enabled by a Site Administrator.

First time was not obvious to me too. :wink:

Cheers,
m.

1 Like

Gracias Marc por su respuesta, perdón por el castellano, me es más fluido para poder explicar.

El problema parece estar que con el usuario que intento activarlo, es el administrador, tiene incluso en la base de datos el id=1.

He probado a darle todos los roles/permisos a este admin, pero sigue sin poderse activar el plugin de estadísticas de uso.

¿Si lo fuerzo en la base de datos, la activación del plugin, funcionará? Gracias.


Thanks Marc. Sorry for spanish.

The problem is that, the user is the site administrator, with id=1 in database.

I tried to give all roles to this user, but nothing.

Thanks.

Hello @asmecher @bozana , sorry, can you give me some light?

log. No new data:

/pkpfiles/usageStats/usageEventLogs# ls
usage_events_20161103.log

More information. stats/publications/publications no data

imagen

Table metrics
imagen
imagen

I try to enable the plugin on database, but didn’t work.

Thanks.

scheduled_tasks table

imagen

Can i do?, momentarily, to edit

UsageStatsPlugin.inc.php

        function getCanEnable() {
                return !((bool) Application::get()->getRequest()->getContext());
        }

by

        function getCanEnable() {
                #return !((bool) Application::get()->getRequest()->getContext());
                return 1;
        }

And then can i enable the plugin?