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

NewsletterRole/Newsletter Members

Go to End

11 Posts   2545 Views


Community Member, 203 Posts

10 February 2010 at 2:08am

Edited: 10/02/2010 4:18am

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


Community Member, 288 Posts

10 February 2010 at 2:21am

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.


Community Member, 203 Posts

13 February 2010 at 2:04am

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:

Go to Top