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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

E-Commerce Modules /

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, Ed, frankmullenger, biapar, Willr, Ingo, Jedateach, swaiba

Checkout not working


Go to End


2 Posts   2067 Views

Avatar
LBeale

Community Member, 1 Post

20 May 2009 at 4:36pm

i get this warning thing everytime i try to access my checkout.

[Warning] DataObjectSet::__construct: Passed item #0 is not an object or associative array, can't be properly iterated on in templates
GET /SilverStripe-v2.2.3/checkout

Line 82 in /home/.leif/acronum/acronum.com/SilverStripe-v2.2.3/sapphire/core/model/DataObjectSet.php
Source

73 if(is_subclass_of($item, 'ViewableData')) {
74 $this->items[$i] = $item;
75 } elseif(is_object($item) || ArrayLib::is_associative($item)) {
76 $this->items[$i] = new ArrayData($item);
77 } else {
78 user_error(
79 "DataObjectSet::__construct: Passed item #{$i} is not an object or associative array,
80 can't be properly iterated on in templates",
81 E_USER_WARNING
82 );
83 $this->items[$i] = $item;
84 }
85 }
86
87
88 }

Trace

* DataObjectSet::__construct: Passed item #0 is not an object or associative array, can't be properly iterated on in templates
Line 82 of DataObjectSet.php
* DataObjectSet->__construct(Array)
Line 33 of FieldSet.php
* FieldSet->__construct(Array)
Line 38 of CompositeField.php
* CompositeField->__construct()
Line 135 of Payment.php
* Payment::combined_form_fields($5.00 USD,0)
Line 118 of OrderForm.php
* OrderForm->__construct(CheckoutPage_Controller,OrderForm)
Line 253 of CheckoutPage.php
* CheckoutPage_Controller->OrderForm()
* call_user_func_array(Array,Array)
Line 409 of ViewableData.php
* ViewableData->XML_val(OrderForm,,1)
Line 285 of .cache.home..leif.acronum.acronum.com.SilverStripe-v2.2.3.themes.redbusiness_ecommerce.templates.Layout.CheckoutPage.ss
* include(/usr/local/tmp/silverstripe-cache-home-acronum-acronum.com-SilverStripe-v2.2.3/.cache.home..leif.acronum.acronum.com.SilverStripe-v2.2.3.themes.redbusiness_ecommerce.templates.Layout.CheckoutPage.ss)
Line 354 of SSViewer.php
* SSViewer->process(CheckoutPage_Controller)
Line 346 of SSViewer.php
* SSViewer->process(CheckoutPage_Controller)
Line 175 of Controller.php
* Controller->handleAction(HTTPRequest)
Line 107 of RequestHandler.php
* RequestHandler->handleRequest(HTTPRequest)
Line 122 of Controller.php
* Controller->handleRequest(HTTPRequest)
Line 28 of ModelAsController.php
* ModelAsController->handleRequest(HTTPRequest)
Line 277 of Director.php
* Director::handleRequest(HTTPRequest,Session)
Line 121 of Director.php
* Director::direct(/checkout)
Line 115 of main.php

i need it fixed asap if i could please have some help with this.

http://acronum.com/SilverStripe-v2.2.3/checkout

Avatar
bennettpr

Community Member, 37 Posts

23 March 2010 at 9:38pm

Was this ever solved? I've used the eCommerce module before without this error but now I get the same thing. I've upgraded the core and the ecommerce module to the latest versions but no joy..any ideas?

Paul