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?
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, 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.
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.
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
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?
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
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!
In case anyone else encounters this issue or something similar, this is what I did to resolve it:
Re-ran the migration from the backed up OJS 2.x database/files
Exported the tables with missing data from the newly migrated database (controlled_vocab_entries, controlled_vocab_entry_settings, and controlled_vocabs)
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
but when I see the article has other keyword…
select * from submission_settings where submission_id=4799 and setting_name=‘subject’;
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.