Jump to:

10979 Posts in 2722 Topics by 1815 members

All other Modules

SilverStripe Forums » All other Modules » NewsletterRole/Newsletter Members

Discuss all other Modules here.

Moderators: martimiz, Sean, biapar, Willr, Ingo, swaiba, simon_w

Page: 1 2
Go to End
Author Topic: 1928 Views
  • yurigoul
    Avatar
    Community Member
    202 Posts

    NewsletterRole/Newsletter Members Link to this post

    Hi,

    Am trying to work with the newsletter module (latest trunk), but am a bit confused about the member type that should be used with it - and if I should use any since the newsletter module contains its own member type (newsletter/code/NewsletterRole.php). I added DataObject::add_extension('Member', 'NewsletterRole'); to mysite/_config.php but am not sure if that is the right thing to do.

    Another thing is that I do not understand exactly the dropdown menu in the Newsletter Settings page that says: 'Maling list Group'. I can add administrators or I can add any of the other groups that I create under the securtiy panel. I first thought this was the group of recipients but right now I am no longer sure about that. (there is nothing in the documentation about it, I suspect that it has to do with who may or may not administer the newsletters, is that correct?)

    If someone has a complete working example of a newsletter install it would be very much appreciated since documentation is absolutely not clear at all and I still have lots of other questions. For instance: Do I or do I not need the userforms? I installed them but am not sure why exactly since I already have a newsletter subscription page type. Etc.

    This is a rather confusing post, but it reflects the confusion that I am in, sorry

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    Hello,

    I understand your confusion, some of the documentation that exists is really old and no longer applies to the Newsletter module. You don't need to add DataObject::add_extension('Member', 'NewsletterRole'); yourself, the module does this for you in it's config file.

    The mailing list group is indeed the group of recipients for the mail type. Also you do not need the userforms module to get the Newsletter module working.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    Thanks for the answer!

    If the Mailinglist group holds the recipients then I have / there is a problem with it: The Newsletter role is not available there. And the only people I can add are the people who have rights in the CMS-backend. I can create a group of people or a role for people who can access the newsletter tab but that is not what is needed here.

    I also have trouble choosing a template for the newsletter and suspect that that is what gives me a javascript error on saving a newsletter type.

    Diving back into it...

    EDIT: found that THEMES_DIR."/".SSViewer::current_theme()."/templates/email" returns: 'themes//templates/email' inside NewsletterAdmin::template_paths() which means that somehow SSViewer::current_theme() returns an empty string there.

    The newsletter admin now finds my templates at mysite/templates/email but still have the javascript parse error

    EDIT2:
    Javascript parse error in firebug's console:
    994: missing ; before statement
    Fatal error: Class 'Database' not found in <b>/Users/yurigoul/Sites/sstest/newsletter/code/NewsletterAdmin.php on line 651

    That is inside NewsletterAdmin::save()

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    Which version of Silverstripe are you running?

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    If you're running a newer version (not sure when the change happened, some time after 2.3.3) the class has changed name to SS_Database so if you change the line to reflect that you're hopefully good to go.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    SS_Database::Bingo! (Am running 2.4 Beta)

    But I still do not understand what the deal is with the mailing list group. Am I supposed to create a security group that has no rights in the CMS and use that as a recipient group or am I missing something here? I am asking this because there also is a NewsletterRole created by the Newsletter Module but it does not show up.

  • MarcusDalgren
    Avatar
    Community Member
    288 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    Yes I think that's the idea.

    I've complained about this too since you can end up with alot of users in your member table that don't have any kind of access or privileges to the site, they're just newsletter subscribers. All the newsletterRole does is add some fields and relations to the Member class, it doesn't add any permission codes.

    I usually setup a group for this and then make sure that anyone registering for the newsletter ends up in that group.

  • yurigoul
    Avatar
    Community Member
    202 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    Thank you so much!!!

    1928 Views
Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.