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.

Archive /

Our old forums are still available as a read-only archive.

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

Setting up a newsletter subscription page


Reply


8 Posts   14159 Views

Avatar
dorset_snapper

Community Member, 4 Posts

28 July 2007 at 4:41am

I'm having trouble setting up a newsletter subscription page. I get this error message on publishing it:

Fatal error: Call to a member function getRecord() on a non-object in /sites/ss2demo/www/sapphire/forms/CheckboxSetField.php on line 20

I tried setting one up also on the SS demo site and got the same error message. Is it a bug or have i missed something out ?

Avatar
JoGiles

9 Posts

28 July 2007 at 9:20pm

Yes, I got the same problem so I would be keen to hear any thoughts on this from the devs.

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

29 July 2007 at 4:14pm

Hi guys,

Would you mind trying to applying the following patches that I posted at [url]http://www.silverstripe.com/bugs/flat/1675[/url] and seeing if they fix your problem?:
[url=http://www.elijahlofgren.com/silverstripe/patches/Fix-bug-Specific-newsletters-option-in-newsletter-subscription-form-page-type-does-not-work-cms-sapphire-gsoc-r37301.patch]Fix-bug-Specific-newsletters-option-in-newsletter-subscription-form-page-type-does-not-work-cms-sapphire-gsoc-r37301.patch[/url]
[url=http://www.elijahlofgren.com/silverstripe/patches/Fix-bug-AllNewsletters-value-not-being-passed-to-OptionsetField-cms-gsoc-r37360.patch]Fix-bug-AllNewsletters-value-not-being-passed-to-OptionsetField-cms-gsoc-r37360.patch[/url]

What version of SilverStripe are you running? Let me know if it's SilverStripe 2.0.2b and I can try to patch and attach fixed files to this post.

Hope this helps,

Elijah Lofgren

Avatar
JoGiles

9 Posts

29 July 2007 at 4:17pm

Hello, yes, I am running 2.0.2b.

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

29 July 2007 at 5:53pm

Hi Jo,

It's gotten late here so I need to head to bed. I'll try to post the patched files here on Monday. ;)

- Elijah

Avatar
JoGiles

9 Posts

29 July 2007 at 5:56pm

Hehe, no worries :-)

Avatar
elijahlofgren

Google Summer of Code Hacker, 222 Posts

31 July 2007 at 8:51am

Attached is a patch for 2.0.2b that simply applies the fixes that have already been applied to SilverStripe trunk (http://svn.silverstripe.com/open/modules/)

If you don't want to use the a patch (apply on Linux with "patch -p0 < Fix-Specific-Newsletter-Bug-for-202b.diff"), you can get the fixed version of the two files here:
[url]http://svn.silverstripe.com/open/modules/sapphire/trunk/forms/CheckboxSetField.php[/url]
[url]http://svn.silverstripe.com/open/modules/cms/trunk/code/Newsletter/SubscribeForm.php[/url]

Hope this helps,

Elijah

Avatar
Tatey

Community Member, 18 Posts

2 August 2007 at 11:46am

Applying these patches worked for me. Thanks a lot :)