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.

All other Modules /

Discuss all other Modules here.

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

Newsletter error


Reply


3 Posts   1852 Views

Avatar
davidhagen

Community Member, 3 Posts

13 February 2009 at 11:30pm

I just did a fresh installation of latest version of SS. I was setting up a site and couldn't get Newsletter form getting work.
When I view the page I see this error..

FATAL ERROR: Invalid argument supplied for foreach()
At line 266 in /Applications/xampp/xamppfiles/htdocs/silverstripe/cms/code/Newsletter/SubscribeForm.php

SubscribeForm_Controller->Form()

call_user_func_array(Array,Array)
line 404 of ViewableData.php

ViewableData->XML_val(Form,,1)
line 203 of .cache.Applications.xampp.xamppfiles.htdocs.silverstripe.themes.blackcandy.templates.Layout.Page.ss

include(/Applications/xampp/xamppfiles/htdocs/silverstripe/silverstripe-cache/.cache.Applications.xampp.xamppfiles.htdocs.silverstripe.themes.blackcandy.templates.Layout.Page.ss)
line 197 of SSViewer.php

SSViewer->process(SubscribeForm_Controller)
line 189 of SSViewer.php

SSViewer->process(SubscribeForm_Controller)
line 296 of Controller.php

Controller->defaultAction(index,Array)
line 267 of Controller.php

Controller->run(Array)
line 22 of ModelAsController.php

ModelAsController->run(Array)
line 104 of Director.php

Director::direct(/newsletter/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)

* form =
Form
o EmailFieldEmailField (EditableEmailField17: Email address : ) =
o TextFieldTextField (EditableTextField18: Your name : ) =
o TextareaFieldTextareaField (EditableTextField20: Address : ) =
o TextFieldTextField (EditableTextField21: Job title : ) =
o TextFieldTextField (EditableTextField22: Organisation : ) =
o HiddenFieldHiddenField (Referrer: : ) = http://localhost/silverstripe/
Validator
o EditableEmailField17
o EditableTextField18
* newsletterList =

* newsletters =

Avatar
Willr

Forum Moderator, 5513 Posts

16 February 2009 at 2:00pm

Is that the 2.3rc latest version of Silverstripe or the latest stable 2.2.3?. You might like to test using the latest 2.3rc3 of SilverStripe and the latest daily build from the newsletter download page and see if that works.

Avatar
shingonoide

Community Member, 3 Posts

25 March 2009 at 10:12am

I had the same problem with 2.3.1 version, trying to add one "Subscribe Form".
I think maybe one problem with "there's no newsletter yet" and I've added new newsletter and the page was opened right.

I had no time now to debug in deep and I think this comment maybe help future release.

Thanks