Skip to content

Breaking change in PageRender::renderPage()Β #2157

@Toutouwai

Description

@Toutouwai

PW 3.0.253 makes changes to the PageRender class. Previously there was a hookable PageRender::renderPage() method that hooked Page::render().

https://github.com/processwire/processwire/blob/44fcf13ea2d7f14a04eed54c29afcc79eb46ec45/wire/modules/PageRender.module#L72

It looks like the changes are intended to be backwards compatible:

https://github.com/processwire/processwire/blob/40c456c257e2978a7224956be01cb0106a62d05b/wire/modules/PageRender.module#L396-L406

But in constructing $legacyHookEvent the event object is set to $this (i.e. PageRender) whereas previously the event object would have been Page. This breaks existing code/modules that are hooking PageRender::renderPage().

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions