I have an EventSystem handler that sets a default metadata schema if a new page is created. This works perfect if I create the page in the CME. But if I create a new page (based on a Page Type) in XPM, the EventSystem doesn't kick in. So my metadata schema isn't set on the page. (Metadata schema has 1 required text-field, with a default value)
In my EventSystem handler I subscribe using the following code:
EventSystem.Subscribe<Page, LoadEventArgs>(SetDefaultSchema, EventPhases.Processed);
I also tried this (CrudEventArgs):
EventSystem.Subscribe<Page, CrudEventArgs>(SetDefaultSchema, EventPhases.Processed);
Both work like a charm in the CME, but not when the page is created in XPM. Any clues what I'm doing wrong?
(Tridion 2011, SP1 HR2)