Fix .Fragments when called cross sites on uninitialized output format

Fixes #10794
This commit is contained in:
Bjørn Erik Pedersen
2023-03-05 10:32:00 +01:00
parent df5608f8a0
commit b83050cb40
7 changed files with 114 additions and 33 deletions

View File

@@ -54,12 +54,13 @@ func newPageOutput(
}
po := &pageOutput{
f: f,
pagePerOutputProviders: providers,
ContentProvider: page.NopPage,
PageRenderProvider: page.NopPage,
render: render,
paginator: pag,
f: f,
pagePerOutputProviders: providers,
ContentProvider: page.NopPage,
PageRenderProvider: page.NopPage,
TableOfContentsProvider: page.NopPage,
render: render,
paginator: pag,
}
return po
@@ -84,6 +85,7 @@ type pageOutput struct {
pagePerOutputProviders
page.ContentProvider
page.PageRenderProvider
page.TableOfContentsProvider
// May be nil.
cp *pageContentOutput
@@ -96,6 +98,7 @@ func (p *pageOutput) initContentProvider(cp *pageContentOutput) {
p.contentRenderer = cp
p.ContentProvider = cp
p.PageRenderProvider = cp
p.TableOfContentsProvider = cp
p.cp = cp
}