OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Importing back issues

Are you responsible for making OJS work -- installing, upgrading, migrating or troubleshooting? Do you think you've found a bug? Post in this forum.

Moderators: jmacgreg, btbell, michael, bdgregg, barbarah, asmecher

Forum rules
What to do if you have a technical problem with OJS:

1. Search the forum. You can do this from the Advanced Search Page or from our Google Custom Search, which will search the entire PKP site. If you are encountering an error, we especially recommend searching the forum for said error.

2. Check the FAQ to see if your question or error has already been resolved.

3. Post a question, but please, only after trying the above two solutions. If it's a workflow or usability question you should probably post to the OJS Editorial Support and Discussion subforum; if you have a development question, try the OJS Development subforum.

Importing back issues

Postby ramon » Sun Sep 30, 2007 1:05 pm

Alec,

I emailed you a few questions about importing back issues.
We used OJS to generate an XML for an issue, to compare the data and fix the XML from another database.

The difference is that the XML from OJS embeds the PDF galleys, while the data from the external database has a <href> tag to indicate the galley source.

I created a sample xml, mixing information for 1 article and one issue, with a link to the PDF in another server.
This is the error reported:

Code: Select all
Warning: copy(http://www.cjf.gov.br/revista/numero16/abertura1.pdf) [function.copy]: failed to open stream: Connection timed out in /var/www/tiu.cej.local/treina/lab01/ojs2/classes/file/FileManager.inc.php on line 135

Warning: Cannot modify header information - headers already sent by (output started at /var/www/tiu.cej.local/treina/lab01/ojs2/classes/file/FileManager.inc.php:135) in /var/www/tiu.cej.local/treina/lab01/ojs2/classes/template/TemplateManager.inc.php on line 187


If I import the XML generated from OJS, I get no errors.

Any ideas??
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Importing back issues

Postby asmecher » Sun Sep 30, 2007 1:48 pm

Hi Ramón,

Hmm, it looks like PHP is having trouble requesting the PDF from that URL... is your server directly connected to the Internet, or is is set up via something like a proxy? Have you tried turning off allow_url_fopen in config.inc.php?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm

Re: Importing back issues

Postby ramon » Tue Oct 02, 2007 7:42 am

Alec,

I don't have that variable in ojs2/config.inc.php.
In my php.ini file, allow_url_fopen = On....
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Importing back issues

Postby asmecher » Tue Oct 02, 2007 9:31 am

Hi Ramón,

I'd suggest testing a pure PHP example to see whether or not PHP can access the server; use something like:
Code: Select all
<?php
ini_set('display_errors', E_ALL);
$contents = file_get_contents('http://url-to-galley');
echo 'Read ' . strlen($contents) . " bytes.\n";
?>
Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm

Re: Importing back issues

Postby ramon » Tue Oct 02, 2007 10:59 am

Hi Alec,

I tried and found one server that allowed allow_url_fopen.
The import went smoothly, but the journal was not "fully" configured.

Then I exported the issue and I got a character set problem.
The issue was exported with wrong parameters.

I imported the XML to another server, anyway, and it seemed to go well. This journal is not fully configured either, just skimmed through the setup.

When I tried to access a PDF, this error showed up:
Code: Select all
Fatal error: Call to a member function getLastName() on a non-object in /var/www/tiu.cej.local/treina/lab01/ojs2/classes/article/Article.inc.php on line 153
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Importing back issues

Postby ramon » Mon Oct 08, 2007 5:50 am

Alec,

I believe you are quite crammed with the release of 2.2

Anyway, I was wondering what happens to author indexing infomation (searching by author) and author registration when importing back issues.

What if I import an author that will register after the journal goes live? How will OJS know it should be the same author (especially if the imported issues don't have e-mail for the authors)?

Do we have to "merge" users?
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Importing back issues

Postby asmecher » Mon Oct 08, 2007 10:46 am

Hi Ramón,

The user account who receives "ownership" of the article can only be designated on import; it's currently not possible to transfer it via the UI, but if an author later registers and wants to be able to view the article history, you can transfer ownership in the database by setting the user_id column in the articles table to the new user's user ID.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm

Re: Importing back issues

Postby ramon » Mon Nov 12, 2007 1:06 pm

Hello all,

I'm trying to finalize an import of previous issues, but I'm running into an odd problem.
I'm executing in Firefox in Ubuntu, and after importing the HTML and PDFs are not being displayed in the frame.
The server is forcing the download of either of them.
I tested on a Windows box and the same problem happened.

On a test server this didn't happen, however, the files folder of the test server was at the same level as the system.
On the production server, it's in /home/journalname/files

Anyone with a similar problem??
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Importing back issues

Postby asmecher » Tue Nov 13, 2007 10:17 am

Hi Ramón,

This sounds to me like a problem with MIME types. Could you check the article_files table for those galleys to see what MIME types are in the database?

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm

Re: Importing back issues

Postby ramon » Tue Nov 20, 2007 10:35 am

Hello Alec,

Sorry for the delay, but I've been on vacation for 2 weeks, without wanting computer access for a while.
Trying to catch up now.

It seems to be a charset problem of old HTML files. We asked the support to check the mime types, but didn't really get an answer.

If we change the charset to UTF-8 and upload the file again, it works, while using ISO, Latin-1 or any other charset, the file fails to load.
Sometimes it even prevents the display of the header.

When uploading the file, OJS fails to recognize the label automatically, as it does with PDFs and good HTML files, adding the "no title" text.
This is apparently a hint that there is a problem with the server config....
ramon
 
Posts: 940
Joined: Wed Oct 15, 2003 6:15 am
Location: Brasí­lia/DF - Brasil

Re: Importing back issues

Postby asmecher » Tue Nov 20, 2007 10:38 am

Hi Ramón,

That's odd behavior -- but HTML files should definitely be converted to UTF-8 before they're uploaded anyway, since otherwise accents and special characters will not work. I suspect the mime_content_type function (or file utility, depending on how your server is configured) was having trouble determining the MIME type in non-UTF8 situations, but that's just a guess.

If converting HTML files to UTF-8 before uploading solves the problem, that's the best way to go forward.

Regards,
Alec Smecher
Public Knowledge Project Team
asmecher
 
Posts: 9214
Joined: Wed Aug 10, 2005 12:56 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Bing [Bot] and 4 guests