Copied to clipboard

Flag this post as spam?

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


  • Mary 15 posts 123 karma points
    Nov 09, 2016 @ 14:51
    Mary
    0

    Could not load subscription-providers

    Hi all

    I'm using my own subscription provider which inherits from the Newsletterstudio SubscriptionProviderBase and referenced it in the newsletterStudio.config file:

    The NewsletterStudio version I'm using is 2.1.4.0. Most of the time sending Newsletter works absolutely fine.

    But sometimes it doesn't and the following errormessages are visible in the Log-File:

    "NewsletterStudio: Cound not load subscription-providers. Please check configuration."
    

    and

    "NewsletterStudio, SendNewsletterService: Sequence contains no matching element :    at System.Linq.Enumerable.First[TSource](IEnumerable`1 source, Func`2 predicate)
       at NewsletterStudio.Bll.Providers.SubscriptionProviderFactory.GetProviderByName(String uniqName)
       at NewsletterStudio.Bll.Providers.SubscriptionProviderFactory.GetReceiversBySubscriptionAlias(String value, SendOutParams parameters)
       at NewsletterStudio.Services.EmailTrackingItemService.CreateTrackingItems()
       at NewsletterStudio.Services.SendNewsletterService.SendEmails()"
    

    Unfortunately the exception for the first error message is not thrown, so I'm unable to analyze where the problem appears. Finally I think the subscription provider can not be loaded somehow. The only thing I figured out is, that this time the problem appears, the Umbraco Member groups in the "Send e-mail right now"-Tab from Newsletterstudio are not there.

    Does anybody has an idea what could be the problem?

    Thanks for your replies

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Nov 10, 2016 @ 09:14
    Markus Johansson
    0

    Hi!

    Thanks for using the package! Does this happen all the time our just randomly?

    We could probably add more info to the exceptions for you to debug - do you get the same issues if you remove your custom subscription provider from the configuration?

    Do you know if there is anything in the constructor of you custom subscription provider that might throw an error? You could start by adding some king of try/catch to the constructor and see if you can catch any issues there?

  • Mary 15 posts 123 karma points
    Nov 10, 2016 @ 10:37
    Mary
    0

    Hi!

    Actually it happens very seldom (about once in 2 months) and I've no idea how to provoke it. Our customer sends around 20 newsletter per month without any problems in general .

    Unfortunately I need to use my custom subscription provider because of some extended functions. But all of them as well as the constructor include already a try catch with a loghelper in the catch.

    I rechecked the logfile, but the exceptions didn't seem to be hit out of the functions in my own subscription provider. But just to be sure I added now some loghelper.info at the beginning of every function.

    It would be very nice if you could add the thrown exception to the output from the first error message. This might help a lot to analyze the problem if it occurs the next time.

    Thank you very much.

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Nov 10, 2016 @ 12:51
    Markus Johansson
    0

    Hi!

    I'll add this to our backlog and try to make this clearer in the future. What version of Newsletter Studio are you running on?

    // m

  • Mary 15 posts 123 karma points
    Nov 10, 2016 @ 12:55
    Mary
    0

    Hi

    Currently I'm using the NewsletterStudio version 2.1.4.0.

    regards

  • Mary 15 posts 123 karma points
    Nov 17, 2016 @ 10:31
    Mary
    0

    Hi

    Have you already been able to add this exception above to the backlog?

    Thank you very much

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    Nov 25, 2016 @ 10:10
    Markus Johansson
    0

    Hi!

    Yes, coming next week. There will only be a improved logging error.

    Edit: It is really strange the your custom provider can't be found at certain times. At the same time I can't reproduce the issue which make it hard.

    Could you provide any steps? . Cheers!

  • Aaron Drinkwater 5 posts 75 karma points
    Apr 13, 2017 @ 12:33
    Aaron Drinkwater
    0

    Hi,

    I'm also using a custom subscription provider, which works the majority of the time, but randomly the Umbraco Members list will disappear causing scheduled newsletters to error on sending. I have to restart the site in order to get the list to appear again.

    The only fix seems to be removing the custom subscription provider. Is there any other way that I can keep my custom subscription provider, and not have the Umbraco Members list disappear.

    My custom subscription provider shouldn't be breaking anything when sending the newsletter, as it's just inheriting from the Newsletter Studio one:

        public class CustomUmbracoSubscriptionProvider : NewsletterStudio.Bll.Providers.UmbracoNewSubscriptionProvider
    {
        public override bool Unsubscribe(string email)
        {
            return base.Unsubscribe(email);
        }
    
        public override bool Unsubscribe(string email, string listItemId)
        {
            try
            {
                var ms = ApplicationContext.Current.Services.MemberService;
                ms.DissociateRole(email, listItemId);
                return true;
            }
            catch (Exception ex)
            {
                Logging.LogError("Could not unsubscribe: " + email + " from mailing list: " + listItemId, ex);
                return false;
            }
        }
    }
    

    Is there anything you'd suggest that will allow me to have my custom subscription provider and not have my Umbraco Members list disappear?

  • Markus Johansson 1914 posts 5761 karma points MVP c-trib
    May 21, 2017 @ 16:42
    Markus Johansson
    0

    Hi!

    It's hard to tell why this is happening. If you custom code is running without exceptions the list will be shown otherwise we will swallow the exception and not return the lists from the provider.

    In order to figure out whats wrong you would need to get a hold of the exception that's happening.

Please Sign in or register to post replies

Write your reply to:

Draft