OJS native XML import/export no-embed option

Hi, can anyone can help with this?

Is it possible to use no-embed option for native XML export within web user interface or this is just for command line? Our users need to export data but they don’t have access to the command line. Using plugin without this option consumes all available server memory resulting with an error. Thx.

EDIT: I tried running command line export but it failed with this errors. I’m using OJS 3.3.0-9.

ojs# php tools/importExport.php NativeImportExportPlugin export --no-embed --use-file-urls test.xml rgn issue 903

PHP Warning: array_key_exists() expects parameter 2 to be array, bool given in /var/www-data/ojs/lib/pkp/lib/vendor/adodb/adodb-php/adodb.inc.php on line 4014
PHP Warning: array_key_exists() expects parameter 2 to be array, bool given in /var/www-data/ojs/lib/pkp/lib/vendor/adodb/adodb-php/adodb.inc.php on line 4016
PHP Fatal error: Uncaught Error: Call to a member function getStageId() on null in /var/www-data/ojs/lib/pkp/classes/submission/SubmissionFileDAO.inc.php:768
Stack trace:
#0 /var/www-data/ojs/lib/pkp/plugins/importexport/native/filter/SubmissionFileNativeXmlFilter.inc.php(129): SubmissionFileDAO->getWorkflowStageId(Object(SupplementaryFile))
#1 /var/www-data/ojs/plugins/importexport/native/filter/SupplementaryFileNativeXmlFilter.inc.php(50): SubmissionFileNativeXmlFilter->createSubmissionFileNode(Object(DOMDocument), Object(SupplementaryFile))
#2 /var/www-data/ojs/lib/pkp/plugins/importexport/native/filter/SubmissionFileNativeXmlFilter.inc.php(53): SupplementaryFileNativeXmlFilter->createSubmissionFileNode(Object(DOMDocument), Object(SupplementaryFile))
#3 /var/www-data/ojs/lib/pkp/classes/filter/Filter.inc.php(449): SubmissionFileNativeXmlFilter->process(Object(SupplementaryFile))
#4 /var/www-data/ojs/lib/pkp/plugins/importexport/native/filte in /var/www-data/ojs/lib/pkp/classes/submission/SubmissionFileDAO.inc.php on line 768

Without those two options there is no error, but there is a timeout because processing takes so much time.

Regards,

Nino

Hi @orcalator

There is an option/flag to increase the memory limit when running CLI php commands. The memory_limit option lets you set the total amount of server memory to be allocated (in megabytes). Could you please try to run:

ojs# php memory_limit=768M tools/importExport.php NativeImportExportPlugin export --no-embed --use-file-urls test.xml rgn issue 903

You can set the memory_limit to any value your server has of memory and see whether it works.

Best,
Israel

Hi @israel.cefrin

Memory is only problem when i don’t use --no-embed option but if i do then i get those errors up there (no matter whether i use memory parameter or not). Btw. u’re missing -d parameter in front of memory_limit (php -d memory_limit=768M …)

Regards,

Nino

Hi @orcalator

If you are attempting to export an issue, could you give a try exporting submissions instead? It is possible that you have some orphan content which is preventing you from to export a issue as a whole at once.

Best,
Israel