Native XML Plugin export does not list publications because item.currentPublicationId.fullTitle fails

Hello,

Installation: OMP 3.3.0-13

I recently merge two installations of my OMP application to one unique OMP application. Thus I upgrade my OMP 3.3.0-13 database with data from another database OMP 3.3.0-13 using import/export Native XML plugin).

I am now facing (after the update is done) an error in Native XML Plugin export.

It does not list publications because item.currentPublicationId.fullTitle is null.


Looking at the file plugins/importexport/native/templates/index.tpl

I could check the id of the item on which currentPublicationId does not bring the info:

{{
(item.publications.find(p => p.id == item.currentPublicationId))
? localize(item.publications.find(p => p.id == item.currentPublicationId).fullTitle)
: 'currentPublication Item with problem =>>>>> ’ + item
}}

image

{{
(item.publications.find(p => p.id == item.currentPublicationId))
? localize(item.publications.find(p => p.id == item.currentPublicationId).fullTitle)
: 'currentPublicationId with problem =>>>>> ’ + item.currentPublicationId
}}

image

Looking at my database in table submissions I have currently 2 submission_id with current_publication_id = 117. | submission_id = 114 and submission_id = 153

But looking in my table publications for the publication_id =117 I have the submission_id = 114 and status = 1.

  • Is this possible?
  • How to fix it?

I am guessing I need to delete the submission 153 since looks a wrong entry for some reason. Testing, I did the deletion directly on the database and it fix the problem.

Delete from submissions where submission_id =153

However I am looking for a safer way to delete the submission. My problem is that there is no other data other than the entry to the submission table for the submssion_id 153. (so far I could check). Thus I cannot find the submssion = 153 in my interface and delete trough there.

I am thinking that I should us the same logic in method deleteById in class PKPSubmissionDAO.inc.php

Ideally I would use the route POST http://localhost:8000/index.php/home/api/v1/_submissions/153 but I am not sure how the logic and the authorizations works.

My questions are:

  • What would you recommend to delete this submission if the same is not available to delete trough the interface?

  • Is the deleteById in class PKPSubmissionDAO.inc.php the right function to check?
    thus the relations for submission would be indeed: (I am sign here because I couls just find the database schema for omp 3.4 available not for omp 3.3, you also can forward me the doc for the schema is easier)

      $submission 
    
      $publication
      $submissionFiles
      $reviewRound
      $editDecision
      $reviewAssignment	
              $query
      $stageAssignments
      $note
      $submissionComment
      $notification
      $submissionEventLog
      $submissionEmailLog
    

What application are you using?
version running OMP - 3.3.0.13
OS platform - Linux
PHP version - 7.4.33
Apache version - Apache
Database driver - mysql
Database server version = 5.5.5-10.5.27-MariaDB