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).
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 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!
I’ve just tested your import file and it worked for me – there are no duplicated in my DB after the import 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 Maybe you will find a possibility to try import somewhere else?
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?