Skip to main content

This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.

We've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

NewsletterRole/Newsletter Members


Go to End


11 Posts   3845 Views

Avatar
yurigoul

Community Member, 203 Posts

6 February 2010 at 4:48am

Edited: 06/02/2010 4:49am

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 :-(

Avatar
MarcusDalgren

Community Member, 288 Posts

9 February 2010 at 2:59am

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.

Avatar
yurigoul

Community Member, 203 Posts

9 February 2010 at 3:12am

Edited: 09/02/2010 4:10am

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()

Avatar
MarcusDalgren

Community Member, 288 Posts

9 February 2010 at 4:14am

Which version of Silverstripe are you running?

Avatar
MarcusDalgren

Community Member, 288 Posts

9 February 2010 at 4:16am

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.

Avatar
yurigoul

Community Member, 203 Posts

9 February 2010 at 4:33am

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.

Avatar
MarcusDalgren

Community Member, 288 Posts

9 February 2010 at 4:37am

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.

Avatar
yurigoul

Community Member, 203 Posts

9 February 2010 at 7:38am

Thank you so much!!!

Go to Top