Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Son Pham 31 posts 72 karma points
    Jun 02, 2015 @ 10:39
    Son Pham
    0

    LocalizationService.SavedDictionaryItem event does not fire

    Is it a bug in Umbraco 7 ? I can catch media service event when I click save button. But does not work for localization service ? Is there any way to catch event when user save or delete dictionary item.

     

    Thank you so much

    public class RegisterEvents : ApplicationEventHandler
    {
        public RegisterEvents()
        {
            MediaService.Saved += new TypedEventHandler>(MediaServiceSaved);
            LocalizationService.SavedDictionaryItem += new TypedEventHandler>(DictionaryServiceSaved);
        }
        void MediaServiceSaved(IMediaService sender, SaveEventArgs e)
        {
            foreach (var mediaItem in e.SavedEntities)
            {
                // Do whatever you want with each entity
            }
        }
        void DictionaryServiceSaved(ILocalizationService sender, SaveEventArgs e)
        {
            foreach (var dicItem in e.SavedEntities)
            {
                // Do whatever you want with each entity
            }
        }
    }
  • Alex Skrypnyk 6175 posts 24186 karma points MVP 8x admin c-trib
    Jun 02, 2015 @ 13:08
    Alex Skrypnyk
    0

    Hi Son,

    Where are you registering your events ?

    Did you read https://our.umbraco.org/Documentation/Reference/Events-v6/Application-Startup ?

    Thanks

  • Son Pham 31 posts 72 karma points
    Jun 02, 2015 @ 13:14
    Son Pham
    0

    Hi Alex. I register by creating cs class inherit ApplicationEventHandler. The problem is if you see in my code snippet MediaService work but LocalizationService does not work. I dont know why. I also try to put event register in ApplicationStarted instead of default contructor but does not help

    protected override void ApplicationStarted(UmbracoApplicationBase umbracoApplication, ApplicationContext applicationContext)

     

  • Son Pham 31 posts 72 karma points
    Jun 15, 2015 @ 19:38
    Son Pham
    0

    Has anybody the same problem with me. Some event of umbraco 7 does not work

  • Yakov Lebski 591 posts 2347 karma points
    Jul 05, 2015 @ 12:49
    Yakov Lebski
    0

    I have the same problem in 7.2.6

  • Yakov Lebski 591 posts 2347 karma points
    Jul 10, 2015 @ 07:40
    Yakov Lebski
    0

    please vote this issues http://issues.umbraco.org/issue/U4-4137

Please Sign in or register to post replies

Write your reply to:

Draft