Importexport and date_published

I am importing old articles to OJS 2.4.8.1 by trasforming xml database dump to the importexport plugin format.

It seems that date_published is required, but I cannot see where it’s actually used (I want to check that the import was succesful).

Also is there a way to bulk remove articles? I have multiple copies of them because I have tried to import them multiple times (when I realised that there was info missing).

Hi @WaDelma

The “date_published” of an issue you can see as editor on the “Issue Data” page and of an article on the article “Editing” page > “Scheduling”.

Unfortunately, I am unaware of a possibility to bulk remove articles :frowning:

Best,
Bozana

I just reseted the whole database (because this is test installation).

I tried to import again and realised that there is something seriously wrong: When I import it just continues to do it. Now I have atleast 10 copies of every single article imported.

All the data seems to be there though. Oh well. I’ll look error logs tomorrow.

[Wed Oct 12 11:08:35.075002 2016] [:error] [pid 9031] [client #############:24376] ojs2 has produced an error\n  Message: WARNING: assert(): Assertion failed\n  In file: /var/www/ojs/classes/article/Article.inc.php\n  At line: 231\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 5.4.16\n   Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n   DB Driver: mysql\n   DB server version: 5.5.50-MariaDB, referer: http://#############:8080/index.php/dissertationes/manager/importexport/plugin/NativeImportExportPlugin/import
[Wed Oct 12 11:08:35.158538 2016] [:error] [pid 9069] [client #############:64706] ojs2 has produced an error\n  Message: WARNING: assert(): Assertion failed\n  In file: /var/www/ojs/classes/article/Article.inc.php\n  At line: 231\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 5.4.16\n   Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n   DB Driver: mysql\n   DB server version: 5.5.50-MariaDB, referer: http://#############:8080/index.php/dissertationes/manager/importexport/plugin/NativeImportExportPlugin/import
[Wed Oct 12 11:08:35.404600 2016] [:error] [pid 9194] [client #############:30828] ojs2 has produced an error\n  Message: WARNING: assert(): Assertion failed\n  In file: /var/www/ojs/classes/article/Article.inc.php\n  At line: 231\n  Stacktrace: \n  Server info:\n   OS: Linux\n   PHP Version: 5.4.16\n   Apache Version: Apache/2.4.6 (CentOS) PHP/5.4.16\n   DB Driver: mysql\n   DB server version: 5.5.50-MariaDB, referer: http://#############:8080/index.php/dissertationes/manager/importexport/plugin/NativeImportExportPlugin/import

My error_log is full of that when I try to do the import. It seems that journal->getSetting(‘copyrightYearBasis’) returns invalid value and triggers that assert.

I don’t know if that is the reason it creates multiple dublicates of the articles. Only clear pattern that I can see in the dublicates is that dublicates of one article are not next to each other in article_id which would indicate that it tries to do the import again and again after failing for some reason. There is also different amounts of dublicates for different articles, probably because it starts the restart cycle at different times.

Edit. Currently there is 896 articles when there should be 227.

Hmmm… The assertion failure I can understand if the journal settings are missing, but I’ve never had this duplication of the articles :open_mouth: Do you work with the recent ojs-stable-3_0_0 or master branch? – Because there are some import/export fixes since 3.0 release. Would it be possible to send me an XML example of such an article? You could use my e-mail address bozana(dot)bokan(at)posteo(dot)net for that. I will then try to reproduce it…
Thanks!

It’s in 2.4.8.1, because we decided that we will delay OJS 3 upgrade for a bit (We have had problems getting our stuff out from our previous host :P).

I’ll send you the whole thing as it’s one xml with lots of articles inside articles tag, which might be relevant.

@WaDelma

I’ve just tested your import file and it worked for me – there are no duplicated in my DB after the import :open_mouth: I use linux and current ojs-stable-2_4_8 branch (which should be the same as 2.4.8.1 release regarding this, I think). I only found that one closing XML element “firstname” is missing which leads to a DB error for me and a PDF file is not there so this leads to an error as well. I will write you an e-mail which articles that are. Furthermore, the XML file is not valid – the order of elements is not as defined in the DTD, but this seems not to bother OJS when importing. I don’t know where do you have the locale “fi_FI” from – my installation doesn’t have it, thus I had to replace that with one that exists in OJS/my installation.
Maybe it is something ‘strange’ with your installation? but I have no idea what could it be :frowning: Maybe you will find a possibility to try import somewhere else?

Best,
Bozana

Whoops should have mentioned about the locale: I created dummy one for FI_fi (There is Finnish locale in works).

I have no idea where the ‘firstname’ ending tag disappeared. The missing PDF was actually wrong link… Have to look why xslt didn’t create right one.

Yeah maybe it’s the installation that has the problem… Or database? I was using Centos 7 and mariadb for it.

I just created new VM and installed OJS 2.8.4.1 to it and it still duplicates imports…
I fixed the problems that you noticed.

Could it be the dummy locale? I created it by copying en_US to fi_FI and adding it to locales.xml

@WaDelma

Hmmm… I don’t know – I wouldn’t think but… Could your maybe test one more thing: to replace the locale fi_FI in your import XML file by es_ES that is installed and enabled for everything in your test journal and test the import again?

Thanks!
Bozana

I created new issue and tried to import es_ES version to it and it still dublicates…

This is so weird

Ahhh… I might know why you cannot recreate the problem.

Are you using the command line tool? Because I just tried with it and it doesn’t seem to produce duplicates.

I had been using the web interface for import.

Hi @WaDelma

No, I also used journal manager web interface. Yes, it is weird…

:-OOO Bozana