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're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

All other Modules /

Discuss all other Modules here.

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

Newsletter Module

Go to End

5 Posts   1090 Views


Community Member, 52 Posts

23 November 2010 at 12:02pm

Hi All

i have been using the newsletter module for a couple of sites i am currently building, seems to be going ok on both sites.
on one of the sites i am using the subscription form so people can sign themselves up to receive the news letter.
when you submit the form i get the following back. DataObject::get_by_id passed a non-numeric ID #, when i go into the admin area the user has been created and is in a default group, i tried setting up a new group role etc and the submission is still put in a default group.
i'm suspecting that the form is not finding a newsletter type and group to associate the user to.
have i set this up wrong? can anyone help please?


Forum Moderator, 5523 Posts

23 November 2010 at 9:27pm

Edited: 23/11/2010 9:27pm

Is this with the latest daily build of the newsletter? (

If you're still having troubles with it register the bug over at or email the module maintainer.

Also - do you have the full backtrace of that error you get, might make debugging easier.


Community Member, 52 Posts

24 November 2010 at 11:57am

Hi Will

thanks for your reply, i guess i was short on info for you.
Using SS 2.4.2 with the latest daily build trunk-r113848 (have learnt to do this first) also read some other posts from a couple of weeks ago that resolved some questions but not this one.

here is the error complete

[User Warning] DataObject::get_by_id passed a non-numeric ID #
POST /newsletter/Form
Line 2924 in C:\Inetpub\mydomain\sapphire\core\model\DataObject.php

2915 $tableClasses = ClassInfo::dataClassesFor($callerClass);
2916 $baseClass = array_shift($tableClasses);
2917 return DataObject::get_one($callerClass,"\"$baseClass\".\"ID\" = $id", $cache);
2919 // This simpler code will be used by non-DataObject classes that implement DataObjectInterface
2920 } else {
2921 return DataObject::get_one($callerClass,"\"ID\" = $id", $cache);
2922 }
2923 } else {
2924 user_error("DataObject::get_by_id passed a non-numeric ID #$id", E_USER_WARNING);
2925 }
2926 }
2928 /**
2929 * Get the name of the base table for this object
2930 */
DataObject::get_by_id passed a non-numeric ID #
Line 2924 of DataObject.php
Line 253 of SubscriptionPage.php
Line 300 of Form.php
Line 137 of RequestHandler.php
Line 155 of RequestHandler.php
Line 147 of Controller.php
Line 199 of ContentController.php
Line 67 of ModelAsController.php
Line 281 of Director.php
Line 124 of Director.php
Line 127 of main.php

i hope this helps.


Forum Moderator, 5523 Posts

24 November 2010 at 9:52pm

Just pushed another update (r114130) to newsletter trunk which fixed the ID issue on my end. Also tidied up some of the validation.

Could you try out that revision and let me know how you get on!


Community Member, 52 Posts

25 November 2010 at 8:19pm

Great stuff Will

the new trunk solved the issue... thanks for your help on this