Missing main menu items for journal in OJS v3.x

Greetings,

We’re in the process of upgrading our OJS environment from v2.4.8 to v3.x. We had a slew of database issues but finally managed to work through most of them for our 4 OJS instances. Unfortunately, we have a few remaining snafus.

One of these is the lack of main menu items for an instance with a single journal. We should be seeing “Submissions, Issues, Settings, Users & Roles, Tools, Administration” and we’re only seeing “Users & Roles, Administration”. We created a second journal in the same instance without the problem but the first journal still has missing menu items. Using Chrome Inspector to have a closer look, I noticed that the original journal had two JS errors in the console:

build.js:6 Uncaught TypeError: Cannot read property ‘_constants’ of undefined
at Object.init (build.js:6)
at submissions:135

and

build.js:6 Uncaught TypeError: Cannot read property ‘_constants’ of undefined
** at Object.init (build.js:6)**
** at submissions:148**

Following the “submissions” link gets me to the pkp.registry.init routine (e.g. “pkp.registry.init(‘unassigned-list-handler-5b452cef98fa0’, ‘SubmissionsListPanel’, );”)

Has anyone seen this before? Suggestions welcome. Thanks.

//Joerg (IT Library @ UBC)

Hi @jmesser,

What specific version of OJS 3.x are you upgrading to?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

We’re testing against v3.1.1 and the final upgrade will be against v3.1.1-2 later this month.

//Joerg

Hi @jmesser,

I think the Javascript messages might not be related to this – the menu generation happens server-side. Are you sure the account you’re logged in with has roles in the journal, e.g. Editor or Journal Manager?

Regards,
Alec Smecher
Public Knowledge Project Team

Alec,

I think your right. I created a new account in the original journal and the menus reappeared. What would be the best way to elevate my privileges? I don’t see an obvious way of doing this.

//Joerg

Hi @jmesser,

As Site Administrator, go into the journal’s Users & Roles area; find the user (you may need to use the checkbox filter to include users without a role in the journal); and edit the user. You should be able to add roles there.

Regards,
Alec Smecher
Public Knowledge Project Team

Hi Alec,

I think we’re getting closer. The problem seems to be with the Site Administrator access. I don’t appear to have an account that has top level access. My knowledge of OJS access control is a bit sketchy but I’m assuming that a Site Admin has full access to all journals (all menus available). That’s what I’m seeing with our other OJS instances. Unfortunately, with this one anomalous instance, it’s not the case. Any thoughts on how I would go about tweaking things to to clear this up?

//Joerg

Hi @jmesser,

The Site Administrator is pretty much always also the Journal Manager, because they create the journal and are automatically assigned to that role at that point. Perhaps for this one journal the role was revoked?

You should still have the “Users & Roles” menu in your journal, and you can re-add the Journal Manager role for this journal using that. Generally speaking:

  • Go to Users & Roles
  • Open the filters for the user list, and click the checkbox to include users without roles in this journal
  • Find your user account and open Edit
  • Add the Journal Manager role
  • Reload the Management page to see the new menu come available.

Regards,
Alec Smecher
Public Knowledge Project Team

Alec,

The problem appears to be that the account which I thought was the Site Admin (user_id=1) does not seem to have the access required for this edit. I get the following:

“You do not have sufficient permissions to administer this user. In order to administer a user, you must either be site administrator, or administer all contexts that this user is enrolled in.”

Is there something I can patch on the backend?

//Joerg

Hi @jmesser,

The function that checks whether you’re allowed to administer a particular user is canAdminister in the file lib/pkp/classes/security/Validation.inc.php. It seems as though you’re failing one of the checks there.

Regards,
Alec Smecher
Public Knowledge Project Team

Alec,

Thanks. I’ll see if I can determine where the problem lies.

//Joerg