10854 Posts in 2518 Topics by 1794 members
Page: 1 2
|Go to End||Next >|
6 February 2010 at 4:48am Last edited: 6 February 2010 4:49am
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
9 February 2010 at 2:59am
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.
9 February 2010 at 3:12am Last edited: 9 February 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.
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.
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()
9 February 2010 at 4:14am
Which version of Silverstripe are you running?
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.
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.
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.
9 February 2010 at 7:38am
Thank you so much!!!
Page: 1 2
|Go to Top||Next >|