Ticket #386 (closed defect: fixed)

Opened 6 years ago

Last modified 6 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:
Hardware: Operating system:
Product: URL:


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

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN"

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

comment:1 Changed 6 years ago by work@…

  • Owner changed from work@… to business@…
  • Status changed from new to assigned

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

comment:2 Changed 6 years ago by business@…

  • Milestone changed from 0.7.1 to Must have

comment:3 Changed 6 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

comment:4 Changed 6 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/ /

Please retest on ci

comment:5 Changed 6 years ago by robert@…

  • Owner changed from robert@… to work@…

The doctype on CI is now:

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

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

<!DOCTYPE html PUBLIC "-W3CDTD XHTML 1.0 TransitionalEN" "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)?

comment:6 Changed 6 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...

comment:7 Changed 6 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:

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.

comment:8 Changed 6 years ago by robert@…

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

comment:9 Changed 6 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.