[Solved] Unable to see keywords in front-end/metadata area [OJS 3.1.1]

Hi everyone,

We’re running into an issue with article keywords in a recently migrated OJS instance (on v. 3.1.1.0) that I’ve gotten stuck on.

We can’t see any of the keywords for previous articles, either in the front-end display (using the native OJS theme with a custom stylesheet) or in the submission metadata editing area. When I look in the database though, I can still see all of the entries in the controlled_vocab_entries, controlled_vocab_entry_settings, and controlled_vocabs tables. Keywords have also been enabled in the submission settings.

This isn’t happening with all journals on this instance, but just one journal. Any ideas on some next steps to try?

Thanks!

Hi @kaitlin,

Can you describe the recent migration? What did you migrate from?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher,

We migrated this instance from 2.4.8.3 to 3.1.1.0 a little over two weeks ago. The weird thing is, this issue only seems to happen for one journal in the instance.

Hi @asmecher, any ideas on next steps to investigate this issue? I’m a bit stumped!

Hi @kaitlin,

Which of the three columns have been enabled for the keywords field in the submission settings?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, we currently have ‘enabled’ and ‘submission form’ turned on for keywords.

Hi @kaitlin,

Hmm; can you try the following SQL query?

 SELECT * FROM controlled_vocabs WHERE assoc_type=1048585 AND assoc_id=1;

…replacing the 1 with an article ID for an article that you expect to see keywords for but don’t?

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, it looks like they’re working now. I must have fixed it at some point and had something cached so it wasn’t appearing.

Thanks for taking the time to help!

Hi @kaitlin,

Glad to hear it’s resolved!

Regards,
Alec Smecher
Public Knowledge Project Team

Hi @asmecher, I may have spoken too soon - it looks like it’s not appearing for all submissions after all. I’m going to follow up with the journal and see if they’ve added some of them back in.

In the meantime, here’s the output of the query:

mysql> SELECT * FROM controlled_vocabs WHERE assoc_type=1048585 AND assoc_id=3192;
+---------------------+----------------------+------------+----------+
| controlled_vocab_id | symbolic             | assoc_type | assoc_id |
+---------------------+----------------------+------------+----------+
|                5212 | submissionAgency     |    1048585 |     3192 |
|              658277 | submissionDiscipline |    1048585 |     3192 |
|                5211 | submissionKeyword    |    1048585 |     3192 |
|                5213 | submissionLanguage   |    1048585 |     3192 |
|              658271 | submissionSubject    |    1048585 |     3192 |
+---------------------+----------------------+------------+----------+
5 rows in set (0.00 sec)

Hi @kaitlin,

Hmm, that looks fine. Is there anything unusual with that journal relating e.g. to its theme, or to its language configuration?

Regards,
Alec Smecher
Public Knowledge Project Team

The journal in multilingual (english and french), and in terms of style it uses the default theme with a custom stylesheet. The submission keywords appear in the front-end for the entry where they’ve been re-added, so I don’t think the theme is the issue.

Hi @kaitlin,

Could you try throwing the interface language over to French and see if the keywords appear there? (Or, if you’ve been working in French, try English.)

Regards,
Alec Smecher
Public Knowledge Project Team

Still nothing. Here’s the journal in question, and a specific submission that doesn’t display keywords when it should: Don’t Make Me Type: A Study of Students’ Perceptions of Library Catalogues on Tablet Computers | Partnership: The Canadian Journal of Library and Information Practice and Research

Are there other database queries that might point to the issue? I see there are three tables associated with the controlled vocabs - could we be missing data in one of the others?

Hi @kaitlin,

Yes, that’s where I’d look next. Try this query:

SELECT cves.* FROM controlled_vocabs cv JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id) JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id) WHERE cv.assoc_type=1048585 AND cv.assoc_id=1;

…again replacing the 1 with the article ID you want to query.

Regards,
Alec Smecher
Public Knowledge Project Team

1 Like

This returned an empty set, so it looks like this is the issue. I’m thinking I’ll re-run the migration locally, and if it succeeds, then import these missing entries into our production db. I’m still not sure why this happened with this one journal, but I’ll report back if I figure anything else out!

Hi @kaitlin,

OK, sounds good. Do watch out for the “upgrade succeeded” message – if you don’t get it, then your upgrade might have stalled partway through.

Regards,
Alec Smecher
Public Knowledge Project Team

In case anyone else encounters this issue or something similar, this is what I did to resolve it:

  1. Re-ran the migration from the backed up OJS 2.x database/files
  2. Exported the tables with missing data from the newly migrated database (controlled_vocab_entries, controlled_vocab_entry_settings, and controlled_vocabs)
  3. Import the exported data from the sql dump into the production database (testing locally first), changing INSERT INTO statements to INSERT IGNORE INTO to avoid duplicates.

One thing to watch out for is if any articles had keywords added back into the production database. To fix those (we only had 1), I went to the article metadata and clicked ‘save’, which removed the duplicated keywords.

Hi @asmecher,
I have the problem whit this topic in my ojs 3.0.2.0.
when I checked In the sql

SELECT cves.* FROM controlled_vocabs cv JOIN controlled_vocab_entries cve ON (cve.controlled_vocab_id = cv.controlled_vocab_id) JOIN controlled_vocab_entry_settings cves ON (cves.controlled_vocab_entry_id = cve.controlled_vocab_entry_id) WHERE cv.assoc_type=1048585 AND cv.assoc_id=4799;

has this value

image

but when I see the article has other keyword…

select * from submission_settings where submission_id=4799 and setting_name=‘subject’;

image

How can I update the table submission_settings whit the keywords from the table controlled_vocab_entries from the articles or how can I fixed because some articles doesn´t have a row whit the field setting_name = subject in the submission_settings table but in the controlled_vocab_entries table has the keywords.

can you help me?

thanks in advanced.

hi,
I have the problem whit this topic in my ojs 3.0.2.0