Created
March 20, 2013 06:46
-
-
Save ss23/5202786 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
ERROR [User Error]: Uncaught Exception: ManyManyList::add() can't be called until a foreign ID is set | |
IN POST /silverstripe/SilverStripe-cms-v3.0.5/admin/newsletter/MailingList/EditForm/field/MailingList/item/new/ItemEditForm/field/Recipients | |
Line 79 in /var/www/silverstripe/SilverStripe-cms-v3.0.5/framework/model/ManyManyList.php | |
Source | |
====== | |
70: if(is_numeric($item)) $itemID = $item; | |
71: else if($item instanceof $this->dataClass) $itemID = $item->ID; | |
72: else { | |
73: throw new InvalidArgumentException("ManyManyList::add() expecting a $this->dataClass object, or | |
ID value", | |
74: E_USER_ERROR); | |
75: } | |
76: | |
77: // Validate foreignID | |
78: if(!$this->foreignID) { | |
* 79: throw new Exception("ManyManyList::add() can't be called until a foreign ID is set", | |
E_USER_WARNING); | |
80: } | |
81: | |
82: if($filter = $this->foreignIDFilter()) { | |
83: $query = new SQLQuery("*", array("\"$this->joinTable\"")); | |
84: $query->setWhere($filter); | |
85: $hasExisting = ($query->count() > 0); | |
Trace | |
===== | |
ManyManyList->add(Recipient) | |
GridFieldAddExistingAutocompleter.php:158 | |
GridFieldAddExistingAutocompleter->getManipulatedData(GridField,ManyManyList) | |
GridField.php:215 | |
GridField->getManipulatedList() | |
GridField.php:255 | |
GridField->FieldHolder() | |
GridField.php:615 | |
GridField->gridFieldAlterAction(Array,Form,SS_HTTPRequest) | |
GridField.php:101 | |
GridField->index(SS_HTTPRequest) | |
RequestHandler.php:184 | |
RequestHandler->handleRequest(SS_HTTPRequest,DataModel) | |
GridField.php:720 | |
GridField->handleRequest(SS_HTTPRequest,DataModel) | |
RequestHandler.php:206 | |
RequestHandler->handleRequest(SS_HTTPRequest,DataModel) | |
RequestHandler.php:206 | |
RequestHandler->handleRequest(SS_HTTPRequest,DataModel) | |
GridFieldDetailForm.php:82 | |
GridFieldDetailForm->handleItem(GridField,SS_HTTPRequest) | |
GridField.php:686 | |
GridField->handleRequest(SS_HTTPRequest,DataModel) | |
RequestHandler.php:206 | |
RequestHandler->handleRequest(SS_HTTPRequest,DataModel) | |
RequestHandler.php:206 | |
RequestHandler->handleRequest(SS_HTTPRequest,DataModel) | |
Controller.php:153 | |
Controller->handleRequest(SS_HTTPRequest,DataModel) | |
LeftAndMain.php:357 | |
LeftAndMain->handleRequest(SS_HTTPRequest,DataModel) | |
AdminRootController.php:89 | |
AdminRootController->handleRequest(SS_HTTPRequest,DataModel) | |
Director.php:296 | |
Director::handleRequest(SS_HTTPRequest,Session,DataModel) | |
Director.php:119 | |
Director::direct(/admin/newsletter/MailingList/EditForm/field/MailingList/item/new/ItemEditForm/field/Recipients,DataModel) | |
main.php:126 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment