Обсуждение: Doc images are broken
I noticed "Figure 69.1. Page Layout" from the docs doesn't work on either of the two major browsers I tested: https://www.postgresql.org/docs/13/storage-page-layout.html A recent regression seems likely. Is there some way that this can be tested automatically, to avoid or at least quickly catch any would-be regressions in the future? Thanks -- Peter Geoghegan
> On 15 Sep 2021, at 19:47, Peter Geoghegan <pg@bowt.ie> wrote: > > I noticed "Figure 69.1. Page Layout" from the docs doesn't work on > either of the two major browsers I tested: > > https://www.postgresql.org/docs/13/storage-page-layout.html > > A recent regression seems likely. Is there some way that this can be > tested automatically, to avoid or at least quickly catch any would-be > regressions in the future? The image by itself seems to work: https://www.postgresql.org/docs/13/pagelayout.svg The Firefox inspector however sheds some light on it: Content Security Policy: The page’s settings blocked the loading of a resource at https://www.postgresql.org/docs/13/storage-page-layout.html (“frame-ancestors”). The W3 validator returns 47 errors and warnings for the page, but nothing specific to this issue. -- Daniel Gustafsson https://vmware.com/
Daniel Gustafsson <daniel@yesql.se> writes: > The image by itself seems to work: > https://www.postgresql.org/docs/13/pagelayout.svg Yeah, and the image also renders fine for me in a local build of the docs, showing that it's something specific to the www.postgresql.org site. > The Firefox inspector however sheds some light on it: > Content Security Policy: The page’s settings blocked the loading of a resource at > https://www.postgresql.org/docs/13/storage-page-layout.html (“frame-ancestors”). Looks like a smoking gun ... regards, tom lane
On Wed, Sep 15, 2021 at 8:25 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: > > Daniel Gustafsson <daniel@yesql.se> writes: > > The image by itself seems to work: > > https://www.postgresql.org/docs/13/pagelayout.svg > > Yeah, and the image also renders fine for me in a local build > of the docs, showing that it's something specific to the > www.postgresql.org site. > > > The Firefox inspector however sheds some light on it: > > Content Security Policy: The page’s settings blocked the loading of a resource at > > https://www.postgresql.org/docs/13/storage-page-layout.html (“frame-ancestors”). > > Looks like a smoking gun ... Indeed it is. Thanks for the analysis, fix pushed! -- Magnus Hagander Me: https://www.hagander.net/ Work: https://www.redpill-linpro.com/
> On 15 Sep 2021, at 22:12, Magnus Hagander <magnus@hagander.net> wrote: > On Wed, Sep 15, 2021 at 8:25 PM Tom Lane <tgl@sss.pgh.pa.us> wrote: >> >> Daniel Gustafsson <daniel@yesql.se> writes: >>> The Firefox inspector however sheds some light on it: >>> Content Security Policy: The page’s settings blocked the loading of a resource at >>> https://www.postgresql.org/docs/13/storage-page-layout.html (“frame-ancestors”). >> >> Looks like a smoking gun ... > > Indeed it is. Thanks for the analysis, fix pushed! Fix confirmed, it works in Firefox and Safari for me again. -- Daniel Gustafsson https://vmware.com/
On Wed, Sep 15, 2021 at 10:47 AM Peter Geoghegan <pg@bowt.ie> wrote: > I noticed "Figure 69.1. Page Layout" from the docs doesn't work on > either of the two major browsers I tested: > > https://www.postgresql.org/docs/13/storage-page-layout.html > > A recent regression seems likely. Is there some way that this can be > tested automatically, to avoid or at least quickly catch any would-be > regressions in the future? I'm pretty sure that the same exact regression has happened again. That is, "Figure 69.1. Page Layout" looks distorted in a way that I believe looks just like the issue reported back in September of 2021. Can this be fixed? Ideally in a way that will allow any similar regressions to be detected early going forward? -- Peter Geoghegan
On 2/21/23 10:56 AM, Peter Geoghegan wrote: > On Wed, Sep 15, 2021 at 10:47 AM Peter Geoghegan <pg@bowt.ie> wrote: >> I noticed "Figure 69.1. Page Layout" from the docs doesn't work on >> either of the two major browsers I tested: >> >> https://www.postgresql.org/docs/13/storage-page-layout.html >> >> A recent regression seems likely. Is there some way that this can be >> tested automatically, to avoid or at least quickly catch any would-be >> regressions in the future? > > I'm pretty sure that the same exact regression has happened again. > That is, "Figure 69.1. Page Layout" looks distorted in a way that I > believe looks just like the issue reported back in September of 2021. Define distorted. It looks fine to me here on Firefox 110.0. > > Can this be fixed? Ideally in a way that will allow any similar > regressions to be detected early going forward? > -- Adrian Klaver adrian.klaver@aklaver.com
On Tue, Feb 21, 2023 at 11:01 AM Adrian Klaver <adrian.klaver@aklaver.com> wrote: > Define distorted. It looks fine to me here on Firefox 110.0. There is a very thick black margin that takes up a substantial portion of the image overall. It looks wrong. If I look at the page from last year through archive.org (https://web.archive.org/web/20220115102330/https://www.postgresql.org/docs/13/storage-page-layout.html), the image doesn't have any such distortion/margin, on exactly the same browser (Chrome). See the attached screenshots. As I said, I'm pretty sure that the symptoms were identical back in September of 2021. -- Peter Geoghegan
Вложения
Adrian Klaver <adrian.klaver@aklaver.com> writes: > On 2/21/23 10:56 AM, Peter Geoghegan wrote: >> I'm pretty sure that the same exact regression has happened again. >> That is, "Figure 69.1. Page Layout" looks distorted in a way that I >> believe looks just like the issue reported back in September of 2021. > Define distorted. It looks fine to me here on Firefox 110.0. Looks okay to me in Safari as well --- there's a rather large black border around the figure, but I don't see anything wrong with the figure itself. regards, tom lane
On Tue, Feb 21, 2023 at 11:15 AM Tom Lane <tgl@sss.pgh.pa.us> wrote: > Looks okay to me in Safari as well --- there's a rather large black > border around the figure, but I don't see anything wrong with the > figure itself. Perhaps the word "distorted" was overstating it. The black border definitely isn't supposed to be there, though. -- Peter Geoghegan
On Tue, Feb 21, 2023 at 11:21 AM Peter Geoghegan <pg@bowt.ie> wrote: > Perhaps the word "distorted" was overstating it. The black border > definitely isn't supposed to be there, though. Chrome Developer mode shows me the following error when run against the page in question (which is https://www.postgresql.org/docs/13/storage-page-layout.html): "Refused to apply inline style because it violates the following Content Security Policy directive: "style-src 'self' fonts.googleapis.com tagmanager.google.com". Either the 'unsafe-inline' keyword, a hash ('sha256-TSlN9iIwid/izE/G6oaDB90xp+keZMu2WTr1Y7Gnrrc='), or a nonce ('nonce-...') is required to enable inline execution. Note that hashes do not apply to event handlers, style attributes and javascript: navigations unless the 'unsafe-hashes' keyword is present." I'm no expert, but this definitely seems relevant to me. -- Peter Geoghegan
On Tue, Feb 21, 2023 at 8:34 PM Peter Geoghegan <pg@bowt.ie> wrote:
On Tue, Feb 21, 2023 at 11:21 AM Peter Geoghegan <pg@bowt.ie> wrote:
> Perhaps the word "distorted" was overstating it. The black border
> definitely isn't supposed to be there, though.
Chrome Developer mode shows me the following error when run against
the page in question (which is
https://www.postgresql.org/docs/13/storage-page-layout.html):
"Refused to apply inline style because it violates the following
Content Security Policy directive: "style-src 'self'
fonts.googleapis.com tagmanager.google.com". Either the
'unsafe-inline' keyword, a hash
('sha256-TSlN9iIwid/izE/G6oaDB90xp+keZMu2WTr1Y7Gnrrc='), or a nonce
('nonce-...') is required to enable inline execution. Note that hashes
do not apply to event handlers, style attributes and javascript:
navigations unless the 'unsafe-hashes' keyword is present."
I'm no expert, but this definitely seems relevant to me.
That does seem to be it. I've applied a patch that allows "unsafe-inline" styling on the SVGs in docs and it looks much better now.
On Tue, Feb 21, 2023 at 1:06 PM Magnus Hagander <magnus@hagander.net> wrote: > That does seem to be it. I've applied a patch that allows "unsafe-inline" styling on the SVGs in docs and it looks muchbetter now. Thanks! -- Peter Geoghegan