Im new to Umbraco.Currently, I installed Mvc version template(7.0.4). I was trying to fire event after document is published but Im not able to make it:
I have just upgraded to 7.0.4 and can verify that my events are indeed still working. I am subscribing to the ContentPublishing event.
Pawan, you are subscribing to the Published event, but you don't have any code inside your ContentService_Published method. What are you trying to achieve?
Quite honestly, I think the documentation is the only thing holding Umbraco back from being the leader for CMS. The videos are great, but with the pace everything is changing they can't even get new versions of videos pushed out before something changes. Be nice if they started doing a manual for each version. I'd pay $30-$50 each major version for documentation that is up to date and accurate.
event not firing wrt document
Hello,
Im new to Umbraco.Currently, I installed Mvc version template(7.0.4). I was trying to fire event after document is published but Im not able to make it:
Following is my code:
public class Events : ApplicationEventHandler
{
public Events()
{
ContentService.Published += ContentService_Published;
}
public void ContentService_Published(Umbraco.Core.Publishing.IPublishingStrategy sender, Umbraco.Core.Events.PublishEventArgs<IContent> e)
{
//throw new NotImplementedException();
}
protected override void ApplicationStarting(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)
{
base.ApplicationStarting(umbracoApplication, applicationContext);
Document.AfterPublish += Document_AfterPublish;
}
public void Document_AfterPublish(Document sender, umbraco.cms.businesslogic.PublishEventArgs e)
{
//throw new NotImplementedException();
}
}
Please let me know if Im missing somthing.
I'm actually having problems with events not firing as well. Not sure if I'm doing something wrong or they aren't working in v7.0.4.
Here's my plea for help on StackOverflow: http://stackoverflow.com/questions/22256817/umbraco-applicationeventhandler-events-not-firing
Hi Guys,
I have just upgraded to 7.0.4 and can verify that my events are indeed still working. I am subscribing to the ContentPublishing event.
Pawan, you are subscribing to the Published event, but you don't have any code inside your ContentService_Published method. What are you trying to achieve?
Thanks,
Matt
Figured out my problem. I was using this documentation, which says it is for 6.1+: http://our.umbraco.org/documentation/Reference/Events/application-startup
Unfortunately, the new version 7 backend doesn't seem to call Document or Media events. Instead it is using the ContentService and MediaService events. So I had to wire up my events according to this instead: http://our.umbraco.org/documentation/Reference/Events-v6/MediaService-Events
Quite honestly, I think the documentation is the only thing holding Umbraco back from being the leader for CMS. The videos are great, but with the pace everything is changing they can't even get new versions of videos pushed out before something changes. Be nice if they started doing a manual for each version. I'd pay $30-$50 each major version for documentation that is up to date and accurate.
is working on a reply...