OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



OJS Native Import fatal php error wiping out issues

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.

OJS Native Import fatal php error wiping out issues

Postby mobleyt » Fri May 09, 2014 10:41 am

So I have a pretty large import file structured to use the native import export plugin in OJS at the command line. The files contains multiple issues. I am also importing files in this import with galleys pointing to PDFs already on the local machine. The import seems to run well initially as I see issues, sections, and pieces and their files get added to my Archives page for my journal. However, near the end, I see that OJS and the script starts reversing the process and wiping everything out that it just added, only to finish with the command line error:

Call to a member function getJournalId() on a non-object in /var/www/ojs/classes/file/IssueFileManager.inc.php on line 41

Looking at the file, it seems to be failing at finding or generating an Issue ID as it seems to fail on $issue->getJournalId(). Should I have some issue ID declaration in my import xml? I didn't see anything of the sort in the sample file.

Any idea what might be happening here? The XML file validates against the DTD according to xmllint.

Thanks,
Tyler
mobleyt
 
Posts: 7
Joined: Thu Jan 13, 2011 10:10 am

Re: OJS Native Import fatal php error wiping out issues

Postby asmecher » Fri May 09, 2014 11:17 am

Hi Tyler,

What version of OJS are you using?

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

Re: OJS Native Import fatal php error wiping out issues

Postby mobleyt » Tue May 13, 2014 5:24 am

Hi Alec,

Sorry for my delay. I am running 2.4.4.0. Just installed it fresh on Friday, so aside from some CSS tweaks, it's all standard.

Thanks,
Tyler
mobleyt
 
Posts: 7
Joined: Thu Jan 13, 2011 10:10 am

Re: OJS Native Import fatal php error wiping out issues

Postby JasonNugent » Tue May 13, 2014 8:04 am

hey Tyler,

I haven't been working on the OJS 2.4.4 native import, but my headspace has been occupied by the new import tools for OJS 3. If you like, can you send me the XML you have been trying to import? I don't need any of the PDFs. That way I can see if I can duplicate it and attempt to track down a bug if there is one.

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 873
Joined: Tue Jan 10, 2006 6:20 am

Re: OJS Native Import fatal php error wiping out issues

Postby mobleyt » Tue May 13, 2014 9:37 am

Sure thing. Could I email it to you somehow? Otherwise I can throw it up somewhere temporarily.
mobleyt
 
Posts: 7
Joined: Thu Jan 13, 2011 10:10 am

Re: OJS Native Import fatal php error wiping out issues

Postby JasonNugent » Tue May 13, 2014 11:31 am

sure. jason dot nugent at gmail dot com.
JasonNugent
Site Admin
 
Posts: 873
Joined: Tue Jan 10, 2006 6:20 am

Re: OJS Native Import fatal php error wiping out issues

Postby mobleyt » Tue May 13, 2014 11:38 am

Great. Just sent it along. Thanks for taking a look.

Tyler
mobleyt
 
Posts: 7
Joined: Thu Jan 13, 2011 10:10 am

Re: OJS Native Import fatal php error wiping out issues

Postby JasonNugent » Tue May 13, 2014 11:53 am

Hey Tyler,

Those all went in fine. I used the following command line:

/usr/bin/php tools/importExport.php NativeImportExportPlugin import issues.xml TEST admin

(TEST is my journal path, and I used my admin user).

Output:

Code: Select all
The import was successful. Successfully-imported items are listed below.

Issues:
   Issue Number 79, Spring 2011
   Issue Number 78, Fall 2010
   Issue Number 77, Spring 2010
   Issue Number 76, Fall 2009
   Issue Number 75, Spring 2009
   Issue Number 74, Fall 2008
   Issue Number 73, Spring 2008
   Issue Number 72, Fall 2007
   Issue Number 71, Spring 2007
   Issue Number 70, Fall 2006
   Issue Number 69, Spring 2006
   Issue Number 68, Fall 2005
   Issue Number 67, Spring 2005
   Issue Number 66, Fall 2004
   Issue Number 65, Spring 2004
   Issue Number 64, Fall 2003
   Issue Number 63, Spring 2003
   Issue Number 62, Fall 2002
   Issue Number 61, Spring 2002


Ended with 934 articles, into 19 issues. Used a completely stock version of OJS 2.4.4 fresh from the PKP website.

Important note -- the import process will fail if it can't copy the article files. Just running your import without using real PDFs will result in the problem you describe (the import, and then the deletion). Is everything cool with respect to permissions on your end?

Regards,
Jason
JasonNugent
Site Admin
 
Posts: 873
Joined: Tue Jan 10, 2006 6:20 am

Re: OJS Native Import fatal php error wiping out issues

Postby mobleyt » Tue May 13, 2014 12:01 pm

Ah, that's good to know. I did notice in my import that a couple of them article files failed to copy due to filename inconsistencies between my XMl and the PDFs. However, as the import never seemed to fail ON the articles with mislabeled files, I assumed it could pass them without error, and I could fix those few up later. I'm assuming this means I need to clean up the handful of filenames first and then see what happens.
mobleyt
 
Posts: 7
Joined: Thu Jan 13, 2011 10:10 am

Re: OJS Native Import fatal php error wiping out issues

Postby mobleyt » Tue May 13, 2014 1:02 pm

Yep, cleaning up those few filenames let the import complete successfully. Thanks for your help!

Tyler
mobleyt
 
Posts: 7
Joined: Thu Jan 13, 2011 10:10 am

Re: OJS Native Import fatal php error wiping out issues

Postby JasonNugent » Wed May 14, 2014 6:37 am

Excellent, glad to hear things worked out.
JasonNugent
Site Admin
 
Posts: 873
Joined: Tue Jan 10, 2006 6:20 am


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], grandpol and 6 guests