OJS OCS OMP OHS

You are viewing the PKP Support Forum | PKP Home Wiki



Format for uploading HTML Galley files

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.

Format for uploading HTML Galley files

Postby raghavp » Wed Jul 18, 2007 8:39 pm

Hi. First I would like to thank the developers for creating such an amazing software. It is exactly what I and the journal I am working for needs.

I would like to mention before that I did try searching the forums for a resolution to my problem but that search led me to threads that either didn't have the same issue or had incomplete information.

I am trying to (as the subject would suggest) upload HTML Galley files. I attempted this two ways.

The first method I tried, was to take an HTML file that was created earlier and upload that directly and then attempt to view it. However, php and the XHTML validator complained about having two headers, which makes sense because the uploaded file had headers and OJS added its own headers after the file's headers were processed.

The second method I tried was removing all header information and place only the "content" div without any HTML headers. In this case, however, OJS inserted the headers after the file leading to a PHP complaint/error of the form:

Code: Select all
Warning: Cannot modify header information - headers already sent by (output started at classes/var/www/pennscience/file/FileManager.inc.php:153) in /var/www/pennscience/classes/template/TemplateManager.inc.php on line 187.


Any help on the matter would be greatly appreciated. Thanks.

Raghav
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm

Postby asmecher » Thu Jul 19, 2007 7:23 am

Hi Raghav,

This is something we've been meaning to address for a while, but haven't yet because the current work-around hasn't given anyone trouble. Basically, if you leave the HTML headers in your document, OJS will add its own leading to non-validating (but working) HTML. If you remove the headers, however, OJS can't detect that your HTML is actually HTML and doesn't quite know what to do with it. I'd suggest leaving the headers in place until we address the problem, which will hopefully be with our next release. We're striving for XHTML compliance and this something that's overdue for attention.

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

Postby raghavp » Thu Jul 19, 2007 3:00 pm

Actually, the problem you described is not quite the issue I am having.

In actuality, the file I uploaded has no headers and is still recognized as HTML. The issue that is arising is that OJS is placing the header after the end of file and that is what is causing the issue.
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm

Postby asmecher » Thu Jul 19, 2007 3:05 pm

Hi Raghav,

If you click on the "Edit" link beside the galley as Editor or Layout Editor, do you get to a page that allows you to upload a stylesheet and images? If not, the galley isn't being correctly detected as HTML. This leads to a bug that's already been fixed in CVS for types that are "inlineable" -- e.g. plain text -- but not HTML, which can be fixed by patching with http://pkp.sfu.ca/cvs/cvsweb.cgi/ojs2/pages/article/ArticleHandler.inc.php.diff?r1=1.62;r2=1.63. However, you'll still have difficulties with other parts of the system if OJS isn't able to correctly identify your HTML galleys.

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

Postby raghavp » Thu Jul 19, 2007 5:16 pm

I see. So the solution then is to upload a HTML file with headers and stay XHTML incompatible for now?

Also, would you know which headers are given priority in browsers?
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm

Postby asmecher » Thu Jul 19, 2007 6:08 pm

Hi Raghav,

An alternative would be to upload the full HTML, then (once the detection process is finished) replace the file in the Edit Galley page with the partial HTML.

Browsers, in my experience, mostly don't tend to distinguish. In the case of meta tags, for example, both are typically processed. For things like titles, the main set (in this case, provided by OJS) takes precedence.

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

Re: Format for uploading HTML Galley files

Postby raghavp » Mon Sep 03, 2007 3:34 pm

Hi,

Sorry for dragging this thread along once more, but now that I finally started working on the site intently, I am unable to figure out what headers to keep, etc.

When I upload the file: http://www.seas.upenn.edu/~raghavp/article_test.html, the system recognizes it at HTML and allows me to upload images, CSS etc. However, whenever clicking on the "view proof" on the layout editing page, it produces a page with only the words "Back to Submissions Editing" on the top while nothing in the other frame. Loading the frame externally leads to a page with an empty "body" section.

To sort of determine what to actually include, I went to http://journals.hil.unb.ca/index.php/Ac ... /2138/2504, a journal featured on the PKP support page, and copied the format into my html that I uploaded.

On a side note, copying the HTML produced on that site and testing it on the OJS installation I have, the view proof shows the text of the article, and an external frame produces a page with a filled body section.

From what it seems to me, OJS for some reason is not adding the HTML file I uploaded into any page. Any help would be appreciated.
raghavp
 
Posts: 8
Joined: Wed Jul 18, 2007 8:26 pm


Return to OJS Technical Support

Who is online

Users browsing this forum: Google [Bot], Yahoo [Bot] and 2 guests