Opened 7 months ago

Closed 7 months ago

Last modified 7 months ago

#5559 closed defect (fixed)

chunked-html-web renders blank (google analytics)

Reported by: robe Owned by: robe
Priority: blocker Milestone: PostGIS 3.5.0
Component: documentation Version: master
Keywords: cjmayo Cc:

Description

Change History (22)

comment:1 by robe, 7 months ago

This might be a disk space issue, debbie is down to 1.5GB

comment:2 by robe, 7 months ago

It's not the disk space at issue. Just triggered a rebuild and it's still messed up. When I look at view source I see lots of text, but it's not showing.

The headers look all screwed up. Like compared to 3.4, it has <?xml version="1.0" encoding="UTF-8" standalone="no"?> as the first line. This is not an xml document. That shouldn't be there. Unfortunately just removing that doesn't fix the issue.

comment:3 by robe, 7 months ago

Other thing I am noticing, the 3.5 docs end with a doubling of body and head

</footer></body></html></head><body></body></html>

total mess no wonder it doesn't show as everything is stuffed in the head.

comment:4 by strk, 7 months ago

#5553 was the cause of recent change

comment:5 by strk, 7 months ago

The xsl used mentions XHTML which I guess is expected to start with XML declaration

comment:6 by strk, 7 months ago

I guess we can revert the change switching to XHTML, given the book warns about possibly reduced browsers support: http://www.sagehill.net/docbookxsl/OtherOutputForms.html#GeneratingXhtml

comment:7 by strk, 7 months ago

Keywords: cjmayo added

This problem is only with chunked html, the single page html did not have problems (beside possible broken support for old browsers)

It would be great to have a tool guard after these outputs, some kind of html validator/evaluator to run via Makefile or script and used by CI

comment:9 by strk, 7 months ago

Single page html validation: https://validator.w3.org/nu/?doc=http%3A%2F%2Fpostgis.net%2Fdocs%2Fmanual-dev%2Fpostgis-en.html

I guess you cannot html-validate an XHTML

comment:10 by strk, 7 months ago

As of [c65bbfb2a32e5e5677789b2c6240ff17b78957d8/git] both single-page and chunked xhtml render fine when loaded locally with firefox. Both are reported as having type text/xhtml and both are reported as being utf8 encoded. I'm looking how to validate them via xmllint, which is something we can do with xhtml but not with html I think.

comment:11 by strk, 7 months ago

I filed https://trac.osgeo.org/postgis/ticket/5561#ticket for the task of adding automated testing of the xhtml output

comment:12 by strk, 7 months ago

I've downloaded the index.html from chunked html published on postgis.net to test locally and I confirm that even when loaded from filesystem the page shows blank. I'm running some diffs to find out why. The only diff I see is that the online version has this:

9d8
<     <script src="ga.js" type="text/javascript"/>
43,50d41
<             <h2 class="subtitle">
<               <sub>
< DEV (<span class="emphasis"><em>
< Fri 29 Sep 2023 08:04:39 AM UTC rev. c65bbfb </em></span>
< )</sub>
<             </h2>
<           </div>
<           <div>

Maybe it is the google analytics breaking things (didn't someone recently mention we were not doing google analytics anymore?)

comment:13 by strk, 7 months ago

I confirm removing the <script> tag fixes the page ! This maybe has to do with XHTML having a stricter validator in browsers, but I'm not sure. Is it ok to remove that communication of PostGIS Manual readers IP addresses to Google ?

comment:14 by strk, 7 months ago

Summary: Just noticed manual-dev is not accessiblechunked-html-web renders blank (google analytics)

comment:15 by strk, 7 months ago

I'd drop google analytics and use our own stats, with something like https://www.openwebanalytics.com/ or https://matomo.org/

comment:16 by Sandro Santilli <strk@…>, 7 months ago

In adbf48e/git:

[debbie] do not include google analytics in chunked html manual

References #5559

comment:17 by strk, 7 months ago

Matomo was asked for in osgeo SAC already: https://trac.osgeo.org/osgeo/ticket/2830

comment:18 by strk, 7 months ago

I've filed https://trac.osgeo.org/postgis/ticket/5562 to drop google analytics from repo

comment:20 by Sandro Santilli <strk@…>, 7 months ago

In 35038820/git:

Make chunked html output indented

Greatly helps spotting the difference between builds

See #5559

comment:21 by strk, 7 months ago

Resolution: fixed
Status: newclosed

Ok docs are back, I'm closing this as completed

comment:22 by strk, 7 months ago

For the record: I was told that the problem with the <script> tag was that XHTML5 required a closing tag (</script>) which is evidently not being done by our use of xsltproc and http://cdn.docbook.org/release/xsl/current/xhtml5/docbook.xsl XSL.

Whether this is a bug in the docbook.xsl file or in xsltproc is out of scope at the moment, but shall we ever need to use --stringparam html.script this problem will need to be solved.

Note: See TracTickets for help on using tickets.