Error rendering macro 'viewport-redirect'

Cannot invoke "com.atlassian.confluence.pages.AbstractPage.getSpaceKey()" because "redirectToPage" is null