Jump to:

2076 Posts in 857 Topics by 449 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, Sean, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba, simon_w

Page: 1
Go to End
Author Topic: 767 Views
  • lorlen
    Avatar
    Community Member
    2 Posts

    [SOLVED] Urgent help needed regarding bug when saving product Link to this post

    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.php

    Source
    ======
    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.php

    DataObjectSet->setByIDList(Array)
    line 100 of HasManyComplexTableField.php

    HasManyComplexTableField->saveInto(Product)
    line 997 of Form.php

    Form->saveInto(Product,1)
    line 684 of LeftAndMain.php

    LeftAndMain->save(Array,Form,SS_HTTPRequest)
    line 304 of Form.php

    Form->httpSubmission(SS_HTTPRequest)
    line 137 of RequestHandler.php

    RequestHandler->handleRequest(SS_HTTPRequest)
    line 155 of RequestHandler.php

    RequestHandler->handleRequest(SS_HTTPRequest)
    line 147 of Controller.php

    Controller->handleRequest(SS_HTTPRequest)
    line 281 of Director.php

    Director::handleRequest(SS_HTTPRequest,Session)
    line 124 of Director.php

    Director::direct(/admin/EditForm)
    line 127 of main.php

    Any ideas?

  • lorlen
    Avatar
    Community Member
    2 Posts

    Re: [SOLVED] Urgent help needed regarding bug when saving product Link to this post

    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

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