Jump to:

10986 Posts in 2724 Topics by 1817 members

All other Modules

SilverStripe Forums » All other Modules » NewsletterRole/Newsletter Members

Discuss all other Modules here.

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

Page: 1 2
Go to End
Author Topic: 1935 Views
  • yurigoul
    Community Member
    202 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    EDIT3: You also have to change one HTTPRequest into a SS_HTTPRequest. Am back in business, try to put it life next and see how it holds

    EDIT2: Sorry, the error persists, when you create a new newsletter draft it appears ok but opening it again creates the same error ... sorry no ninja php skills here

    EDIT: this error only appeared before I changed all the references to Database:: after that it is ok - so far... isn't there a way to route all calls to Database:: to SS_Database:: in order to be able to use old modules?

    Okay; some new errors when loading a template (error loading page). I am going through the code that is in the newsletter module, changed all the Database:: to SS_Database:: but so far no luck, must be other things that are interfering with it:

    500//ERROR [User Warning]: DataObject::get_by_id passed a non-numeric ID #
    IN POST /_waldner4/admin/newsletter/shownewsletter/1
    Line 2832 in /Users/yurigoul/Sites/_waldner4/sapphire/core/model/DataObject.php

    2823:            $tableClasses = ClassInfo::dataClassesFor($callerClass);
    2824:            $baseClass = array_shift($tableClasses);
    2825:            return DataObject::get_one($callerClass,"\"$baseClass\".\"ID\" = $id", $cache);
    2827:            // This simpler code will be used by non-DataObject classes that implement DataObjectInterface
    2828:         } else {
    2829:            return DataObject::get_one($callerClass,"\"ID\" = $id", $cache);
    2830:         }
    2831:      } else {
    * 2832:         user_error("DataObject::get_by_id passed a non-numeric ID #$id", E_USER_WARNING);
    2833:      }
    2834:   }
    2836:   /**
    2837:    * Get the name of the base table for this object
    2838:    */

    user_error(DataObject::get_by_id passed a non-numeric ID #,512)
    line 2832 of DataObject.php

    line 514 of NewsletterAdmin.php

    line 143 of NewsletterAdmin.php

    line 193 of Controller.php

    line 135 of RequestHandler.php

    line 147 of Controller.php

    line 283 of Director.php

    line 127 of Director.php

    line 122 of main.php

  • MarcusDalgren
    Community Member
    288 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    You could try creating an empty class that extends SS_Database.

    class Database extends SS_Database {}

    Maybe you have to put a __construct() in there that calls the parent but otherwise that might work.

  • yurigoul
    Community Member
    202 Posts

    Re: NewsletterRole/Newsletter Members Link to this post

    A new version of the Newsletter Module was released by Normann and it is 2.4 ready:


    The only thing not working now is the trick to add the newsletter module subscription form and that trick is still working in 2.3.5 and it has to do with user defined forms. I have send an email to willr to ask him about it.

    Details are at the end of this discussion: http://silverstripe.org/all-other-modules/show/270155?showPost=278861

Page: 1 2
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.