Forum archive 2000-2006

Susan Diesel - Show Editor error in 1.7

Susan Diesel - Show Editor error in 1.7

by Arnold Pizer -
Number of replies: 0
inactiveTopicShow Editor error in 1.7 topic started 7/12/2002; 2:05:55 AM
last post 7/29/2002; 6:56:40 AM
userSusan Diesel - Show Editor error in 1.7  blueArrow
7/12/2002; 2:05:55 AM (reads: 1623, responses: 3)
Hi,

When I click Show Editor while viewing a problem, I get this error message:

The XML page cannot be displayed Cannot view XML input using style sheet. Please correct the error and then click the Refresh button, or try again later.

-----------------------------------------------------------------------------


The character '>' was expected. Line 81, Position 5

-- media type, as per [RFC2045] ----^

IE 5.5 or 6 on a PC gives us the error. One of our lab computers does show the source for the problem correctly. It is running IE5 on a Macintosh. What other platform/browswer combinations work?

<| Post or View Comments |>


userArnold K. Pizer - Re: Show Editor error in 1.7  blueArrow
7/26/2002; 7:13:09 AM (reads: 1919, responses: 0)
I believe this may be caused by using newer versions of CGI.pm. My guess is that you are using a version newer than 2.68. By default, CGI.pm versions 2.69 and higher emit XHTML (http://www.w3.org/TR/xhtml1/. There must be some output from the Show Editor function that is not valid under XHTML.

We will try to track this down.

<| Post or View Comments |>


userArnold K. Pizer - Re: Show Editor error in 1.7  blueArrow
7/29/2002; 5:56:25 AM (reads: 1947, responses: 0)
Here is a fast fix that you can use until we track down the real problem. This fix works with the latest version of CGI.pm, version 2.81.

In the script problemEditor.pl which is in the directory .../webwork/system/cgi/cgi-scripts/ change the 10th line from

use CGI qw(:standard escapeHTML unescapeHTML);

to

use CGI qw(:standard escapeHTML unescapeHTML -no_xhtml);

Arnie

<| Post or View Comments |>


userArnold K. Pizer - Re: Show Editor error in 1.7  blueArrow
7/29/2002; 6:56:40 AM (reads: 1961, responses: 0)
Here is the real fix. Simply delete line 408 of the script problemEditor.pl which is in the directory .../webwork/system/cgi/cgi-scripts/

This is the line
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">

The bug was that the DOCTYPE line is added automatically by the start_html command on line 413 so that the html output had two DOCTYPE commands. With CGI.pm version 2.81, the output is xhtml and having two DOCTYPE commands is not valid xml.

Arnie

<| Post or View Comments |>