10390 Posts in 2201 Topics by 1712 members
| Go to End | ||
| Author | Topic: | 1626 Views |
-
Re: NewsletterRole/Newsletter Members

10 February 2010 at 2:08am Last edited: 10 February 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.phpSource
======
2823: $tableClasses = ClassInfo::dataClassesFor($callerClass);
2824: $baseClass = array_shift($tableClasses);
2825: return DataObject::get_one($callerClass,"\"$baseClass\".\"ID\" = $id", $cache);
2826:
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: }
2835:
2836: /**
2837: * Get the name of the base table for this object
2838: */Trace
=====
user_error(DataObject::get_by_id passed a non-numeric ID #,512)
line 2832 of DataObject.phpDataObject::get_by_id(Newsletter,)
line 514 of NewsletterAdmin.phpNewsletterAdmin->getNewsletterEditForm()
line 143 of NewsletterAdmin.phpNewsletterAdmin->shownewsletter(SS_HTTPRequest)
line 193 of Controller.phpController->handleAction(SS_HTTPRequest)
line 135 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 283 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 127 of Director.phpDirector::direct(/admin/newsletter/shownewsletter/1)
line 122 of main.php -
Re: NewsletterRole/Newsletter Members

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.
-
Re: NewsletterRole/Newsletter Members

13 February 2010 at 2:04am
A new version of the Newsletter Module was released by Normann and it is 2.4 ready:
http://www.silverstripe.org/newsletter-module/
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
| 1626 Views | ||
| Go to Top |

