Import article in ojs2.4.8

I am sorry, what you explain on how to import articles/issues from ojs 2.4.x to ojs 3.0.0 is not clear yet for me. I am just a journal editor. Would you mind to give a bit detailed steps to do it? Thanks

The process I am describing will really involve a system administrator who can install a new copy of OJS.

This process is described with steps 1 - 3 of the INSTALL process here:

You will then need to copy the database and the uploaded files (files_dir) from your current install to the new install.

Finally, you would run the OJS 3 upgrade process:

Do you have a system administrator who can help with this?

I am a journal editor. I don’t have full support, one of them is system administrator, at my campus for ojs. So, I go beyond my expertise. Stay tuned in this forum is my chance to learn ojs. I have journal installed with ojs 2.4.x. I want to use native xml export/import in ojs3 to import articles/issues from my old ojs platform. I have tried but failed/ get the error. I want to learn on how to to do it correctly so I can have articles/issues in my new ojs.

Here is what I don’t understand

A quick workaround would be to upgrade a copy of the OJS instance
with the articles and issues you want to 3.x, and then export them from
that instance.

A more full workaround would be to create a XSLT transform to take the 2.4.8 export and output a 3.x compatible one.

As I understand it, you cannot directly export users and articles from OJS2 for import into OJS3.

You have two options, both of which will require external assistance:

You can use the upgrade process (even if only temporarily). This would require help from your system administrator. You can point your system administrator at this forum topic for the explanation.

You can also edit the XML from OJS2 after export to be compatible with OJS3. This will require a developer who is familiar with XML.

Well, it means that quick submit plugin is very important for anyone like me. Will it be available at ojs 3.0.1?

Yes, see:

Dear @ctgraham,
I tried to solve the problem with upgrade OJS 2.4.8.1 to OJS 3.0.2 but have a big problem. As you can see on Database error on upgrade OJS 2.4.8.1 to OJS 3.0.2 - #12 by asmecher I tried a lot but nothing. Problem with database. Could I instal OJS 2.4.8.1 in the new directory, import articles and issues from old and than to upgrade this version of OJS to OJS 3.0.2? Also, do I need to copy directory file (where are all articles and issues in new directory). How to solve my problem with upgrades?

Let’s keep the discussion of the trouble with the upgrade in the other thread.

Regarding the question of import/export, yes, import/export only works currently between the same versions of OJS. You can’t export from OJS 2.x to OJS 3.x (though there is discussion of tackling this problem at the Sprint in a week). Exporting from your existing 2.x to a clean 2.x for upgrade to 3.x aligns with my suggestion above, and may be worth a try for you.

Yes, I understand that we will keep the discussion with this topic. But my problem started with upgrade and import-export articles are probably the best way to solve my problem. Because I cannot make upgrades to OJS 3.0.2 could I do next>

  1. I have OJS 2.4.8.1 which cannot be upgraded. From this version I will export users, all issues and all articles
  2. In subdomain install clean installation of OJS 2.4.8.1 with new database and in this installation import all users, all issues and all articles. After that try to upgrade this clean installation to OJS 3.0.2 and if I do that, then to export users, issues and articles from OJS 3.0.2.
  3. Do I have to copy the files directory where is stored all articles and journals in new OJS 3.0.2 files?
    Maybe is complex, but old OJS 2.4.8.1 cannot be upgraded and from OJS 2.x cannot be exported articles and issues in OJS 3.x.

The OJS 2.4.x export serializes the contents of the files as part of the XML, so you don’t need to make a copy of the files_dir to move articles, issues and users from a 2.4.8 export to a 2.4.8 import.

Once you have imported the contents into the clean OJS 2.4.8 install, you will need to redo your journal level customizations (such as journal settings). This clean install could be upgraded to 3.x. At that point I would verify new journal settings, redo any plugin configuration, and make that the live site. No need for a second 3.x → 3.x import/export round.

Dear @ctgraham,
I imported users without errors. But, when I want to upload issues and articles I received

Import Error
One or more errors occurred during import. Please check to ensure that the format of the import file correctly matches the specification. Specific details of the import errors are listed below.
The upload failed; please ensure that uploads are allowed on your server and that the file is not too big for your PHP and web server configuration.

I tried to upload one by one article and issue but received the same error.
Where is the problem? I export and import XML files from same OJS 2.4.8.1 version.

This is probably a limitation on the size of file you can upload to the server. Some likely constraints would be the maximum upload filesize, maximum memory consumption, and maximum process runtime. Try exporting an issue or two at a time, or increase the resources available to PHP.

Ok. Understand, but when I import I received

Import Articles

The file you are importing contains one or more articles. You must choose an issue and section to import these articles into; if you do not wish to import them all into the same section and issue, you may either separate them into different XML files or move them into the appropriate issues and sections after importing.

I need to select Section but the list is empty.

Are you exporting just the Articles? You probably want to export an Issue or more at a time from the old installation. Importing an Issue will not ask you this question.

My upload_max_ size and post_max_size is on 128 MB and upload limit is not problem. When I upload it OJS logout and demand again login when receive an error.
DB Error: Duplicate entry ‘4-6’ for key 'custom_section_orders_pkey’
or
Import Error
One or more errors occurred during import. Please check to ensure that the format of the import file correctly matches the specification. Specific details of the import errors are listed below.
The upload failed; please ensure that uploads are allowed on your server and that the file is not too big for your PHP and web server configuration.

I tried to upload separately article or issue and all articles and issues but same problem.

Did you delete and re-create the fresh OJS database after you encountered the first failure? If not, it is quite possible that you have a “broken part” of an article or issue loaded which will prevent that same article or issue from fully loading.

If you are having trouble with the same import even after resetting the database to a clean, fresh install, can you replicate the problem with a specific set of import files? If so, there may be a bug in the import process which we can identify and correct.

This is an error which I received after uploading one article:

[25-Jul-2017 07:58:57 Europe/Belgrade] ojs2 has produced an error
Message: WARNING: assert(): Assertion failed
In file: /home/ijcadsee/public_html/ojs/classes/article/Article.inc.php
At line: 231
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.30
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.35-log

and

[25-Jul-2017 08:48:15 Europe/Belgrade] ojs2 has produced an error
Message: WARNING: file_exists(): open_basedir restriction in effect. File(plugins/oaiMetadataFormats/README/READMEOaiMetadataFormatsPlugin.inc.php) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/cpanel/base/3rdparty)
In file: /home/ijcadsee/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php
At line: 230
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.6.30
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.35-log

Now cannot import nothing (users, articles, issues). OJS goes directly to log out. How to solve this and import manually? I try to do that with empty OJS 3.0.2 but cannot upload manually. Received mentionend errors.

The second message probably indicates an unrelated bug, or maybe just an oddity in your configuration. If this openbase_dir restriction applies to other files, we might want to look into it further, but if it just affects plugins you aren’t using for the import/export process, it can probably be ignored.

The first message may be related to your problem. You could get more information by turning on show_stacktrace in config.inc.php and performing the action that triggered the warning again.

If you have a single article which crashes a fresh OJS install when imported, you might want to share the article’s XML (anonymized if desired) so we can try to replicate the problem.

Thank you for answer. I will try to import manually via OJS 3.0.2 with quick submit plugin. In that case I will be sure that OJS 3.0.2 is with fresh copy A few times I tried to import users, articles, issues in OJS 2.4.8.1 but received only errors and problems.
I will try with OJS 3.0.2 to do that and if I have a problem I will inform you. First, I have a problem with upgrade the database, without concrete answers. Now, I must prepare a website because authors start to send articles. I lose enough time with this problem.

Dear @ctgraham,
Before I started with OJS 3.0.2 I tried to import again in fresh copy and database in OJS 2.4.8.1. I imported users, first issue with all articles, but for other OJS log out immediately after importing. Then, I tried to use QuickSubmit plugin, but when I want to upload PDF files OJS log out.

In error log I have>

[25-Jul-2017 18:29:25 Europe/Belgrade] ojs2 has produced an error
Message: WARNING: file_exists(): open_basedir restriction in effect. File(plugins/oaiMetadataFormats/README/READMEOaiMetadataFormatsPlugin.inc.php) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/cpanel/base/3rdparty)
In file: /home/ijcadsee/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php
At line: 230
Stacktrace:
File: (unknown) line (unknown)
Function: PKPApplication->errorHandler(2, “file_exists(): open_basedir restriction in effect. File(plugins/oaiMetadataFormats/README/READMEOaiMetadataFormatsPlugin.inc.php) is not within the allowed path(s): (/home/:/usr/lib/php:/usr/local/lib/php:/tmp:/usr/local/cpanel/base/3rdparty)”, “/home/ijcadsee/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php”, 230, Array(9))
File: /home/ijcadsee/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php line 230
Function: file_exists(“plugins/oaiMetadataFormats/README/READMEOaiMetadataFormatsPlugin.inc.php”)
File: /home/ijcadsee/public_html/ojs/lib/pkp/classes/plugins/PluginRegistry.inc.php line 121
Function: PluginRegistry->_instantiatePlugin(“oaiMetadataFormats”, “plugins/oaiMetadataFormats”, “README”)
File: /home/ijcadsee/public_html/ojs/pages/manager/PluginHandler.inc.php line 55
Function: PluginRegistry->loadCategory(“oaiMetadataFormats”)
File: (unknown) line (unknown)
Function: PluginHandler->plugins(Array(0), Object(Request))
File: /home/ijcadsee/public_html/ojs/lib/pkp/classes/core/PKPRouter.inc.php line 362
Function: call_user_func(Array(2), Array(0), Object(Request))
File: /home/ijcadsee/public_html/ojs/lib/pkp/classes/core/PKPPageRouter.inc.php line 220
Function: PKPRouter->_authorizeInitializeAndCallRequest(Array(2), Object(Request), Array(0), False)
File: /home/ijcadsee/public_html/ojs/lib/pkp/classes/core/Dispatcher.inc.php line 134
Function: PKPPageRouter->route(Object(Request))
File: /home/ijcadsee/public_html/ojs/lib/pkp/classes/core/PKPApplication.inc.php line 178
Function: Dispatcher->dispatch(Object(Request))
File: /home/ijcadsee/public_html/ojs/index.php line 64
Function: PKPApplication->execute()
Server info:
OS: Linux
PHP Version: 5.6.30
Apache Version: N/A
DB Driver: mysql
DB server version: 5.6.35-log

Again, I imported all users and first issue with 18 articles without problem. After that, everything stop. How to import and other issues? Also, in first issue I don`t have PDF and HTML files when I click on the link. Do I have to copy files from old website (from files folder)?