Moderators: jmacgreg, michael, jheckman, barbarah, btbell, bdgregg, asmecher
php tools/importExport.php NativeImportExportPlugin import yourXmlFile.xml journalPath issue_id ##### section_abbrev #####
php tools/importExport.php NativeImportExportPlugin usage
<article>
<title locale="en_US">Jane Doe's Article Title</title>
<abstract locale="en_US">Jane Doe's Article Abstract...</abstract>
<indexing>
<discipline locale="en_US">Education; Literature Education</discipline>
<subject locale="en_US">Young adult literature; Holocaust</subject>
<coverage>
<geographical locale="en_US">North America</geographical>
<chronological locale="en_US">Contempoary</chronological>
<sample locale="en_US">Adolescent readers</sample>
</coverage>
</indexing>
<author primary_contact="true">
<firstname>Jane</firstname>
<lastname>Doe</lastname>
<email>JaneDoe@sample.test</email>
<biography locale="en_US">Jane Doe's Bio statement...</biography>
</author>
<date_published>2004-10-05</date_published>
<htmlgalley locale="en_US">
<label>HTML</label>
<file>
<href src="myfile.html" mime_type="text/html"/>
</file>
<stylesheet>
<href src="myfile.xsl" mime_type="text/xsl"/>
</stylesheet>
<image>
<embed encoding="base64" filename="myfilename.png" mime_type="application/png">(base64-encoded data would appear here)
</embed>
</image>
<image>
<href src="myimage2.png" mime_type="application/png"/>
</image>
</htmlgalley>
<galley locale="en_US">
<label>PDF</label>
<file>
<href src="mygalley.pdf" mime_type="application/pdf"/>
</file>
</galley>
</article><?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE issue PUBLIC "-//PKP//OJS Articles and Issues XML//EN" "http://pkp.sfu.ca/ojs/dtds/native.dtd">
<issue published="true" current="true">
<title>ANA_ISSUE</title>
<volume> 1 </volume>
<number> 1 </number>
<year> 2012 </year>
<section>
<title locale="en_US">ANA_SECTION</title>
<abbrev locale="en_US">ANA_ABR</abbrev>
<article>
<title> …article_title… </title>
<abstract> …article_body… </abstract>
<pages> 1 </pages>
<date_published> …date... </date_published>
<author primary_contact="true">
<firstname>…name...</firstname>
<middlename>…midlename...</middlename>
<lastname>…surname…</lastname>
<email>…email_address...</email>
</author>
</article>
</section>
</issue>php /var/www/ojs/tools/importExport.php NativeImportExportPlugin import test.xml journal_name user_name issue_id 1 section_abbrev ANA_ABR<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE issue PUBLIC "-//PKP//OJS Articles and Issues XML//EN" "http://pkp.sfu.ca/ojs/dtds/native.dtd">
<articles>
<article>
<title> …article_title… </title>
<abstract> …article_body… </abstract>
<pages> 1 </pages>
<date_published> …date... </date_published>
<author primary_contact="true">
<firstname>…name...</firstname>
<middlename>…midlename...</middlename>
<lastname>…surname…</lastname>
<email>…email_address...</email>
</author>
</article>
</articles>
SELECT s.* FROM sections s, section_settings l WHERE l.section_id = s.section_id AND l.setting_name = 'abbrev' AND l.setting_value = ? AND s.journal_id = ?
php /var/www/ojs/tools/importExport.php NativeImportExportPlugin import test.xml notizie_italiane admin issue_id 1 section_abbrev ART
ojs2 has produced an error
Message: WARNING: Missing argument 2 for SectionDAO::getSectionByAbbrev(), called in /var/www/ojs/plugins/importexport/native/NativeImportExportPlugin.inc.php on line 394 and defined
In file: /var/www/ojs/classes/journal/SectionDAO.inc.php
At line: 78
Stacktrace:
Server info:
OS: Linux
PHP Version: 5.3.10-1ubuntu3.1
Apache Version: N/A
DB Driver: mysql
DB server version: 5.5.22-0ubuntu1
NOTICE: Undefined variable: journalId (/var/www/ojs/classes/journal/SectionDAO.inc.php:80)
ERROR:
No section matched the specifier "ART".
$section =& $sectionDao->getSectionByAbbrev(($sectionIdentifier = array_shift($args)), $journal->getId());
Return to OJS Technical Support
Users browsing this forum: Google [Bot] and 2 guests