Native XML export

When I click on Export Native XML I got blank page and no XML has been exported. Please advise.

Thanks

You can get details on a blank page at export by looking at your web server’s error log:

Post the error message here and we can help troubleshoot.

Hello, OJS 3.0 is installed and there is creted journal with sections, created issue,. several articles scheduled to the issue etc.
That is the context of XML not exporting, blank page is only present in browser. However, I will check error log and let you know.

Thanks

Please check this pastebin

Let me know if can be helpful more for this issue.

Thanks

I think, some file (revision element) is missing those dates, making the xml invalid. Could you maybe check in the DB? Also, some impot/export bugs were solved after the release and are in the current ojs-stable-3_0_0 branch, so if you can please use that.
Best,
Božana

Hi all,
this is the error log shows when I export one article

[Sun Nov 27 13:36:52.870104 2016] [autoindex:error] [pid 8435] [client 188.165.28.233:50532] AH01276: Cannot serve directory /home/k2542002/public_html/: No matching DirectoryIndex (index.html.var,index.htm,index.html,index.shtml,index.xhtml,index.wml,index.perl,index.pl,index.plx,index.ppl,index.cgi,index.jsp,index.js,index.jp,index.php4,index.php3,index.php,index.phtml,default.htm,default.html,home.htm,index.php5,Default.html,Default.htm,home.html) found, and server-generated directory index forbidden by Options directive

I have the same problem here on Windows 7 with a local and recent XAMPP installation and OJS 3.0.1

This is the PHP error log:

[15-Dec-2016 13:39:55 Europe/Berlin] PHP Notice:  Trying to get property of non-object in D:\xampp\htdocs\ojs\plugins\importexport\native\NativeImportExportPlugin.inc.php on line 133
[15-Dec-2016 13:45:57 Europe/Berlin] PHP Warning:  DOMDocument::schemaValidate(): Element '{http://pkp.sfu.ca}revision', attribute 'date_uploaded': '' is not a valid value of the atomic type 'xs:date'. in D:\xampp\htdocs\ojs\lib\pkp\classes\xslt\XMLTypeDescription.inc.php on line 126
[15-Dec-2016 13:45:57 Europe/Berlin] PHP Warning:  DOMDocument::schemaValidate(): Element '{http://pkp.sfu.ca}revision', attribute 'date_modified': '' is not a valid value of the atomic type 'xs:date'. in D:\xampp\htdocs\ojs\lib\pkp\classes\xslt\XMLTypeDescription.inc.php on line 126    
[15-Dec-2016 13:45:57 Europe/Berlin] PHP Notice:  Trying to get property of non-object in D:\xampp\htdocs\ojs\lib\pkp\plugins\importexport\native\filter\SubmissionNativeXmlFilter.inc.php on line 284
[15-Dec-2016 13:45:57 Europe/Berlin] PHP Fatal error:  Call to a member function getAttribute() on null in D:\xampp\htdocs\ojs\lib\pkp\plugins\importexport\native\filter\SubmissionNativeXmlFilter.inc.php on line 284

It seems something with the submission file id is wrong (fatal error line 284) but i dont know what. i just uploaded some testdocuments (txt and pdf) for testing.

Hi @florianruckelshausen,

At a glance, it appears as though your system includes some files with empty upload and modification dates. As far as I can see, that shouldn’t be possible – those fields are marked in the database as NOTNULL. Could you check the submission_files table to see if there are empty rows for those two columns?

Regards,
Alec Smecher
Public Knowledge Project Team

I had to create a new example: I just made a new submission with a word document. Here is a screenshot of submission_files

The dates are not emtpty.

I tried exporting using the native XML-plugin and the same PHP error log:
[27-Dec-2016 10:43:15 Europe/Berlin] PHP Warning: DOMDocument::schemaValidate(): Element '{http://pkp.sfu.ca}revision', attribute 'date_uploaded': '' is not a valid value of the atomic type 'xs:date'. in D:\xampp\htdocs\ojs\lib\pkp\classes\xslt\XMLTypeDescription.inc.php on line 126 [27-Dec-2016 10:43:15 Europe/Berlin] PHP Warning: DOMDocument::schemaValidate(): Element '{http://pkp.sfu.ca}revision', attribute 'date_modified': '' is not a valid value of the atomic type 'xs:date'. in D:\xampp\htdocs\ojs\lib\pkp\classes\xslt\XMLTypeDescription.inc.php on line 126 [27-Dec-2016 10:43:15 Europe/Berlin] PHP Notice: Trying to get property of non-object in D:\xampp\htdocs\ojs\lib\pkp\plugins\importexport\native\filter\SubmissionNativeXmlFilter.inc.php on line 248 [27-Dec-2016 10:43:15 Europe/Berlin] PHP Fatal error: Call to a member function getAttribute() on null in D:\xampp\htdocs\ojs\lib\pkp\plugins\importexport\native\filter\SubmissionNativeXmlFilter.inc.php on line 248

I meanwhile did some testing:
The problem is reproducable in my local XAMPP on a windows 7 machine in OJS 3.0.0 and OJS 3.0.1. But i also created a ubuntu 16.04 server in virtualbox owth OJS 3.0.1 and the export/import via the native XML plugin works flawlessly.

MAybe some PHP extensions are needed. I have had the same problme on CentOS instance. Thus, OS is not an issue. I Guess that some PHP extensions should be configured properly or are missing. There is maybe difference in versions of PHP extensions?

Please check that if you can.

The Ubuntu server has PHP7 installed and the local Xampp has PHP5. I have compared the php extension via the php_info output. I tried homogenizing by enabling shmop, sockets and xsl and disabling mysql (and switching the database access from mysql to mysqli in config.inc.php of OJS), bz2 and curl. This had no effect, still the same error in the php error log after apache restart.

The following php extensions are activated in Xampp but not on Ubuntus PHP7:
bcmath, ereg, mhash, odbc, zip

The following php extensions are activated in Ubuntus PHP7 and not in Xampp:
posix, readline, sysvmsg, sysvsem, sysvshm, Zend OPcache

Any suggestions? Or is the main PHP-version difference too big to compare the systems.

It seems that the function strftime i.e. the %F parameter for the function is functioning differently on Windows. This is used for example in https://github.com/pkp/pkp-lib/blob/master/plugins/importexport/native/filter/SubmissionNativeXmlFilter.inc.php. @Dimitris_Efstathiou figured it out and could solve the problem, changing the %F with %Y-%m-%d. @asmecher, shall we then change it everywhere?

1 Like

Hi all,

I found some related documentation on this quirk (for Perl, but it’ll map to the same underlying library) here:

Yes, it would be a good idea to replace the use of %F with %Y-%m-%d throughout.

Thanks,
Alec Smecher
Public Knowledge Project Team

I have had the same issue on GNU/Linux server. So, maybe that is issue, but not only that.