OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Errors in citation markup assistant

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Errors in citation markup assistant

Postby peterv » Wed Aug 10, 2011 6:18 am

Hi,

I had multiple errors in the citation markup assistant in 3 of the 5 OJS instances we have running which had me stumped for quite a while thinking they were caused by connection issues:
"One of the data elements returned from the data source (e.g. a web service) did not conform to the internal meta-data format. Therefore the data source's results were rejected. Please file this as a bug."
"Unsupported or missing publication type. Please manually edit the citation and enter a publication type (allowed types are 'book', 'journal', 'thesis' and 'conf-proc')."

After a lot of debugging, which is pretty hard to do as the scripts run in the background and no errors are logged, I found the offending 'data element' was publication-type. It seems to be checked against entries in 'controlled_vocab_entry_settings' in the database. These entries are missing in a fresh install of at least OJS 2.3.4 and 2.3.6 . The 2 OJS instances which were upgraded from earlier versions did have them, and the Citation Assistant works as expected.

I think I found the necessary database updates in dbscripts/xml/upgrade/2.3.3_update.xml, apparently it is not called on a fresh install of 2.3.4+:
Code: Select all
   <!-- Bug #5394: Implement controlled vocab meta-data properties (and the respective validation) -->
   <sql>
      <!-- Deleting existing entries for idempotence. This will change the IDs of vocab entries which
           could be a problem if referring data exists. We assume that this is an upgrade from a version
           that doesn't know these vocabs at all so there should be no depending data. If this becomes
           a problem we can use ALTER TABLE AUTO_INCREMENT = ... -->
      <query driver="mysql">
         DELETE FROM cv, cve, cves
         USING controlled_vocabs cv
         LEFT JOIN controlled_vocab_entries cve ON cv.controlled_vocab_id = cve.controlled_vocab_id
         LEFT JOIN controlled_vocab_entry_settings cves ON cve.controlled_vocab_entry_id = cves.controlled_vocab_entry_id
         WHERE cv.symbolic IN ('nlm30-publication-types', 'openurl10-journal-genres', 'openurl10-book-genres')
      </query>
      <query driver="postgres7">
         CREATE TEMPORARY TABLE t_cve_delete AS
         SELECT controlled_vocab_entry_id
         FROM controlled_vocabs cv
         INNER JOIN controlled_vocab_entries cve ON cv.controlled_vocab_id = cve.controlled_vocab_id
         WHERE cv.symbolic IN ('nlm30-publication-types', 'openurl10-journal-genres', 'openurl10-book-genres');
      </query>
      <query driver="postgres7">
         DELETE FROM controlled_vocab_entry_settings
         WHERE controlled_vocab_entry_id IN (SELECT * FROM t_cve_delete);
      </query>
      <query driver="postgres7">
         DELETE FROM controlled_vocab_entries
         WHERE controlled_vocab_entry_id IN (SELECT * FROM t_cve_delete);
      </query>
      <query driver="postgres7">
         DELETE FROM controlled_vocabs
         WHERE symbolic IN ('nlm30-publication-types', 'openurl10-journal-genres', 'openurl10-book-genres');
      </query>
      <query driver="postgres7">
         DROP TABLE t_cve_delete;
      </query>

      <!-- publication-types -->
      <query>INSERT INTO controlled_vocabs (symbolic, assoc_type, assoc_id) VALUES ('nlm30-publication-types', 0, 0)</query>
      <query driver="mysql">SET @vocab_id = LAST_INSERT_ID()</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'journal', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'journal', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 1)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 1)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'book', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'book', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 2)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 2)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'conf-proc', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'conf-proc', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 3)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 3)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'thesis', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'thesis', 'string')</query>

      <!-- openurl 1.0 genres (journal) -->
      <query>INSERT INTO controlled_vocabs (symbolic, assoc_type, assoc_id) VALUES ('openurl10-journal-genres', 0, 0)</query>
      <query driver="mysql">SET @vocab_id = LAST_INSERT_ID()</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'journal', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'journal', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'issue', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'issue', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'article', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'article', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'proceeding', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'proceeding', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'conference', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'conference', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'preprint', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'preprint', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'unknown', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'unknown', 'string')</query>

      <!-- openurl 1.0 genres (book) -->
      <query>INSERT INTO controlled_vocabs (symbolic, assoc_type, assoc_id) VALUES ('openurl10-book-genres', 0, 0)</query>
      <query driver="mysql">SET @vocab_id = LAST_INSERT_ID()</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'book', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'book', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'bookitem', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'bookitem', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'conference', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'conference', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'proceeding', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'proceeding', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'report', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'report', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'document', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'document', 'string')</query>

      <query driver="mysql">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (@vocab_id, 0)</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entries (controlled_vocab_id, seq) VALUES (CURRVAL('controlled_vocabs_controlled_vocab_id_seq'), 0)</query>
      <query driver="mysql">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (LAST_INSERT_ID(), '', 'name', 'unknown', 'string')</query>
      <query driver="postgres7">INSERT INTO controlled_vocab_entry_settings (controlled_vocab_entry_id, locale, setting_name, setting_value, setting_type) VALUES (CURRVAL('controlled_vocab_entries_controlled_vocab_entry_id_seq'), '', 'name', 'unknown', 'string')</query>
   </sql>


After running the update script with 2.3.3_update.xml included the citation assistant seems to be functional again. This may not be the best way to fix the issue, so please look into it.

(This post may also be related: http://pkp.sfu.ca/support/forum/viewtopic.php?f=3&t=7151#p27680)

Kind regards,
Peter Vos

VU University Amsterdam Library
peterv
 
Posts: 1
Joined: Mon Jun 30, 2008 6:25 am

Re: Errors in citation markup assistant

Postby asmecher » Wed Aug 10, 2011 9:46 am

Hi Peter,

That's indeed a tricky one to debug -- thanks for tracking it down. I've posted a Bugzilla entry at http://pkp.sfu.ca/bugzilla/show_bug.cgi?id=6817 and will investigate the missing data for our next release. Feel free to CC yourself on that entry, but in the meantime, glad to hear you've got your instance working smoothly.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 8470
Joined: Wed Aug 10, 2005 12:56 pm

Re: Errors in citation markup assistant

Postby jorgecardoso » Sun Dec 25, 2011 5:56 pm

Hi,

I'm having the same problem in OJS 2.3.6. How can I fix this without command line access to the server?

Thanks,
jorge
jorgecardoso
 
Posts: 6
Joined: Sun Dec 25, 2011 5:53 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: No registered users and 5 guests