When we try to create a new page it says "Unable to provide a new item's data Object reference not set to an instance of an object". The stack trace doesn't help either. It says when the core service is invoking create method its not able to create an instance of an object. Our page has some event system code written for it so that it loads a page metadata. I don't see if it could be the event system code which is failing.
The best way to debug whether event system is an issue or not: is put Try/Catch block in event system and in catch block throw the exception. The custom exception thrown by you will appear in message window of Tridion.
To identify exact problem,
- you can perform remote debugging. To perform remote debugging, refer to article: Remote debugging in Tridion
- Alternately, you can also add debugging messages through out your event system code to identify if there are any issues.
Thank you for reminding Nuno. As you guys have gathered from the question that we were population page metadata and creationg some seo content at the time of page creation using the event system.
The root issue was that the event system changed between 2011 and 2013, and a piece of the event system was using Reflection to interrogate the methods that Tridion's service host was running to see at exactly what part the page creation was currently at (it's one event that gets triggered in multiple ways; the code needed to ensure that we're executing only on a particular trigger). That method worked flawlessly for 2011, but 2013 service host was returning StackTrace objects with certain properties null that would previously never have been null.
We commented that piece of code and things started working again.