Skip to content

Adding a new page doesn't run rebuildForPage method #14

@adrianbj

Description

@adrianbj

The rebuildForPage method is not being called when a new page is added, which means that the new page won't have the correct permission for the drole.

This fixes it for me (note the addition of !$page->created):

} else if(count($changes) || !$page->created) {
    $this->rebuildForPage($page);
}

I did notice something a little weird though - when saving an existing page without changing anything, this method is still being called because the changes array always seems to contain "status" even if I haven't changed the status of the page. Any ideas on this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions