When viewing or editing a page template in Space Tools -> Content Tools -> Templates an error is rendered because the macro implementation cannot determine the actual type of the 'page' it is placed on.
This causes an error message to be rendered instead of the macro's button output, yet the template remains fully functional for creating new pages of it.
Steps to reproduce:
Create a new page template in Space Tools -> Content Tools -> Templates
Insert a scroll-export-button macro from the Scroll Exporter Extensions app
Open the macro editor and verify that the preview renders an error
Save the template and view it by clicking its name in the list
Verify it renders an error