Jump to content

Pages::saved events order on new page creation.


Recommended Posts

I am trying to get some sites to remain in Unpublished status until certain conditions are met.
However, I have a problem with the message ProcessPageEdit: Published Page.
Overall, wire()->addHookAfter("Pages :: saved") seems to work for existing pages. And I can put them into Unpublished status whenever I want after I have saved them.
But when creating a new page, the order of events is different. The newly created page is set to Published status when someone clicks Publish in the second step of the page adding process. But it runs after my code.

How to solve this problem?
Is there any documentation about the order of events?

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...