1999 Posts in 530 Topics by 433 members
E-Commerce Modules
SilverStripe Forums » E-Commerce Modules » [SOLVED] Urgent help needed regarding bug when saving product
Discuss about the various e-commerce modules available:
Ecommerce, SS Shop, SilverCart and SwipeStripe
Alternatively, have a look the shared mailinglist.
Moderators: martimiz, Nicolaas, Howard, Sean, Ryan M., biapar, Willr, Ingo, Jedateach, swaiba, simon_w
|
Page:
1
|
Go to End | |
| Author | Topic: | 664 Views |
-
[SOLVED] Urgent help needed regarding bug when saving product

17 December 2010 at 8:25am
Hey guys, whenever I try to save a product in the CMS using the latest SS and eCommerce (burnbright) I get the following error
ERROR [User Error]: Uncaught Exception: Object->__call(): the method 'setbyidlist' does not exist on 'DataObjectSet'
IN POST /admin/EditForm
Line 724 in D:\www\sapphire\core\Object.phpSource
======
715:
716: default :
717: throw new Exception (
718: "Object->__call(): extra method $method is invalid on $this->class:" . var_export($config,
true)
719: );
720: }
721: } else {
722: // Please do not change the exception code number below.
723:
* 724: throw new Exception("Object->__call(): the method '$method' does not exist on '$this->class'",
2175);
725: }
726: }
727:
728: //
-----------------------------------------------------------------------------------------------------------------
729:
730: /**Trace
=====
<ul>Object->__call(setByIDList,Array)
line 100 of HasManyComplexTableField.phpDataObjectSet->setByIDList(Array)
line 100 of HasManyComplexTableField.phpHasManyComplexTableField->saveInto(Product)
line 997 of Form.phpForm->saveInto(Product,1)
line 684 of LeftAndMain.phpLeftAndMain->save(Array,Form,SS_HTTPRequest)
line 304 of Form.phpForm->httpSubmission(SS_HTTPRequest)
line 137 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 155 of RequestHandler.phpRequestHandler->handleRequest(SS_HTTPRequest)
line 147 of Controller.phpController->handleRequest(SS_HTTPRequest)
line 281 of Director.phpDirector::handleRequest(SS_HTTPRequest,Session)
line 124 of Director.phpDirector::direct(/admin/EditForm)
line 127 of main.phpAny ideas?
-
Re: [SOLVED] Urgent help needed regarding bug when saving product

17 December 2010 at 11:55am
Okay guys if you find this thread and have the same problem, here is what it was for me
In Page.php I had added a method called ProductGroups() which would return all the product groups so that every page would have access to it for a sidebar I wanted to have
class Page extends SiteTree {
public static $db = array(
);public static $has_one = array(
);public function ProductGroups() {
return DataObject::get("ProductGroup","",null,null,null);
}}
Unfortunately for me, the official method for getting the ProductGroups in the CMS admin panel has the same name, but returns a different variable type (ComponentSet rather than DataObjectSet) and that is why the problem occurred!
Hope this helps somebody
| 664 Views | ||
|
Page:
1
|
Go to Top |

