Ticket #386 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

HTML Doctype is not used on CI or test.dbnp.org, but is in development mode

Reported by: robert@… Owned by: robert@…
Priority: major Milestone: Must have
Component: Unknown Version: 0.7.0
Keywords: Cc:
Product: Operating system:
URL: Hardware:

Description

The HTML doctype that is present in layouts/main.gsp:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
" http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

is removed on CI and test.dbnp.org. This results in styling differences between development and the production machines (see  https://developer.mozilla.org/en/mozilla%27s_doctype_sniffing). Please make sure all environments behave the same way.

Change History

Changed 3 years ago by work@…

  • status changed from new to assigned
  • owner changed from work@… to business@…

reassigning to Kees to assign to prioritize as I will not be able to pick this up before tuesday and the deadline is wednesday...

Changed 3 years ago by business@…

  • milestone changed from 0.7.1 to Must have

Changed 3 years ago by robert@…

This also causes problems with jquery dialogs on metagenomics.test.dbnp.org. See  http://osdir.com/ml/jquery-ui/2009-08/msg00388.html#. Please resolve asap

Changed 3 years ago by work@…

  • owner changed from business@… to robert@…

This is also caused by mod-proxy-html, I am now setting it explicitly:

                <Location />
                        ProxyHTMLDoctype XHTML
                        SetOutputFilter proxy-html
                        ProxyHTMLURLMap /gscf-0.7.0-ci/ /
                </Location>

Please retest on ci

Changed 3 years ago by robert@…

  • owner changed from robert@… to work@…

The doctype on CI is now:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

while the doctype in gscf/views/layouts/main.gsp is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" " http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

Can you set the configuration such that all html that is set by the application is sent to the browser (including doctype)?

Changed 3 years ago by work@…

  • owner changed from work@… to robert@…

Nope.... that is not possible.... Either we use proxy-html, have nice formed URL's and anchors without all the version nonsense) possibly breaking bookmarks on subsequent version update, or we don't and possibly cause people's bookmarks to stop working because the deeplink to a certain version...

Changed 3 years ago by work@…

We could set it to legacy, so transistional is used instead of strict, but apparently that is -as the option says- legacy:

ProxyHTMLDoctype
Syntax: ProxyHTMLDoctype HTML|XHTML [Legacy]

Alternative Syntax: ProxyHTMLDocType fpi [SGML|XML]

In the first form, documents will be declared as HTML 4.01 or XHTML 1.0 according to the option selected. This option also determines whether HTML or XHTML syntax is used for output. Note that the format of the documents coming from the backend server is immaterial: the parser will deal with it automatically. If the optional second argument is set to "Legacy", documents will be declared "Transitional", an option that may be necessary if you are proxying pre-1998 content or working with defective authoring/publishing tools.

In the second form, it will insert your own FPI. The optional second argument determines whether SGML/HTML or XML/XHTML syntax will be used.

Starting at version 2.0, the default is changed to omitting any FPI, on the grounds that no FPI is better than a bogus one. If your backend generates decent HTML or XHTML, set it accordingly.

From version 3, if the first form is used, mod_proxy_html will also clean up the HTML to the specified standard. It cannot fix every error, but it will strip out bogus elements and attributes. It will also optionally log other errors at LogLevel Debug.

Changed 3 years ago by robert@…

Another option: find a different solution for the url-issues, since this solution doesn't work properly (apparently)

Changed 3 years ago by robert@…

  • status changed from assigned to closed
  • resolution set to fixed

Seems to be working after configuration change.

Note: See TracTickets for help on using tickets.