OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Import/Export Plugin

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.

Import/Export Plugin

Postby metricgravity » Tue Jun 25, 2013 9:06 pm

Hi.

I am trying to use the import/export plugin on OJS. Specifically, I am trying to export information about an article to an XML file. I went into the directory, "ojs/tools". I typed, "php importExport.php NativeImportExportPlugin export test.xml /digipub/apache/apache-2.0.59/htdocs-insectscience/ojs article 3800". I received the following error message.

ERROR:
The specified journal path, "/digipub/apache/apache-2.0.59/htdocs-insectscience/ojs", does not exist.

I read that the proper syntax was, "php importExport.php NativeImportExportPlugin export [xmlFileName] [journal_path] article [articleId]". I was trying to create an XML file called, "test.xml", and I was trying export information about an article with the ID number of 3800. The full address for the "ojs" directory is "/digipub/apache/apache-2.0.59/htdocs-insectscience/ojs". I thought this would be what would go in [journal_path], but the system is claiming this is not a valid journal path.

I thought that perhaps the journal path was instead the directory in which articles are saved. On my system, that directory is "/digipub/apache/apache-2.0.59/uploads-insectscience/journals/1/articles". However, when I type that path, I get a similar error message. Specifically, I typed, "php importExport.php NativeImportExportPlugin export test.xml /digipub/apache/apache-2.0.59/uploads-insectscience/journals/1/articles article 3800". I received the following error message.

ERROR:
The specified journal path, "/digipub/apache/apache-2.0.59/uploads-insectscience/journals/1/articles", does not exist.

I would appreciate your help. It appears that there is a problem with my syntax when I try to use the import/export plugin from the command line.

Thank you.

Best Regards,
metricgravity
metricgravity
 
Posts: 26
Joined: Mon Mar 19, 2012 1:40 pm

Re: Import/Export Plugin

Postby metricgravity » Tue Jun 25, 2013 9:23 pm

I have also attempted to use the import/export plugin on my OJS website. I clicked on, "Articles & Issues XML Plugin". Then I clicked on, "Export Articles". I received the error message, "Fatal error: Call to a member function getJournalId() on a non-object in /digipub/apache/apache-2.0.59/htdocs-insectscience/ojs/classes/issue/IssueAction.inc.php on line 53".

I do not believe this error message is related to the problem of using the import/export plugin on the command line. I have access to another OJS website which does not give this error message. However, when I try to use the import/export plugin on the command line, I get the same type of problem that I had when I tried to use the plugin on the command line for the original website.

I was told that the website "Articles & Issues XML Plugin" only allows one to export articles which are published. Is that true? Does the command line import/export plugin allow one to export unpublished articles? If not, then how would one export unpublished articles?

Thank you,
metricgravity
metricgravity
 
Posts: 26
Joined: Mon Mar 19, 2012 1:40 pm

Re: Import/Export Plugin

Postby JasonNugent » Wed Jun 26, 2013 8:42 am

Hi metricgravity,

I'll answer your second post in a minute, but the 'journal path' that the plugin wants is the URL abbreviation to get to your journal, i.e.: www.yoursite.com/ojs/index.php/JOURNALPATH/....

That's what it is referring to.

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

Re: Import/Export Plugin

Postby JasonNugent » Wed Jun 26, 2013 8:56 am

Hi again,

Can you tell me what version of OJS is generating that error? In a few versions I've looked at, line 53 of IssueAction doesn't contain a call to getJournalId, but there are a few lines nearby that do. We've added some code in recent versions to make sure we have issue or journal objects when calling that.

As I mentioned in the other thread, right now there is no way to export unpublished material. The ImportExport plugins use the search/ArticleSearch class to get results, and right now we only export published articles. The difficulty with exporting unpublished material lies with also maintaining the workflow and you'd have to also bring across things like reviewers, users, and review assignments. If all you want to export and maintain are the submissions themselves, you could probably do a dump of the articles and article_settings table, exporting only things which have a status column other than STATUS_PUBLISHED.

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


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot] and 11 guests