Jump to:

10928 Posts in 2612 Topics by 1809 members

All other Modules

SilverStripe Forums » All other Modules » Newsletter Module

Discuss all other Modules here.

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

Page: 1
Go to End
Author Topic: 798 Views
  • voodoochile
    Avatar
    Community Member
    52 Posts

    Newsletter Module Link to this post

    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?

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Newsletter Module Link to this post

    Is this with the latest daily build of the newsletter? (http://silverstripe.org/assets/modules/trunk/newsletter-trunk-r113848.tar.gz)

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

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

  • voodoochile
    Avatar
    Community Member
    52 Posts

    Re: Newsletter Module Link to this post

    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

    Source
    2915             $tableClasses = ClassInfo::dataClassesFor($callerClass);
    2916             $baseClass = array_shift($tableClasses);
    2917             return DataObject::get_one($callerClass,"\"$baseClass\".\"ID\" = $id", $cache);
    2918
    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    }
    2927
    2928    /**
    2929     * Get the name of the base table for this object
    2930     */
    Trace
    DataObject::get_by_id passed a non-numeric ID #
    Line 2924 of DataObject.php
    DataObject::get_by_id(NewsletterType,)
    Line 253 of SubscriptionPage.php
    SubscriptionPage_Controller->doSubscribe(Array,Form,SS_HTTPRequest)
    Line 300 of Form.php
    Form->httpSubmission(SS_HTTPRequest)
    Line 137 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 155 of RequestHandler.php
    RequestHandler->handleRequest(SS_HTTPRequest)
    Line 147 of Controller.php
    Controller->handleRequest(SS_HTTPRequest)
    Line 199 of ContentController.php
    ContentController->handleRequest(SS_HTTPRequest)
    Line 67 of ModelAsController.php
    ModelAsController->handleRequest(SS_HTTPRequest)
    Line 281 of Director.php
    Director::handleRequest(SS_HTTPRequest,Session)
    Line 124 of Director.php
    Director::direct(newsletter/Form)
    Line 127 of main.php

    i hope this helps.

  • Willr
    Avatar
    Forum Moderator
    5489 Posts

    Re: Newsletter Module Link to this post

    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!

  • voodoochile
    Avatar
    Community Member
    52 Posts

    Re: Newsletter Module Link to this post

    Great stuff Will

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

    798 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.