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.

Archive /

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Failure in E-Commerce Module


Reply


30 Posts   66082 Views

Avatar
quicked

Community Member, 32 Posts

16 January 2008 at 11:48am

http://localhost/silverstripe/checkout
Click on
"Place order and make payment"

FATAL ERROR: DATABASE ERROR: Couldn't run query: SELECT `SiteTree_Live`.*, `Product_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_Live_versions`.AuthorID, `SiteTree_Live_versions`.Version, `SiteTree_Live_versions`.RecordID AS ID FROM `SiteTree_Live` LEFT JOIN `Product_versions` ON `Product_versions`.RecordID = `SiteTree_Live_versions`.RecordID AND `Product_versions`.Version = `SiteTree_Live_versions`.Version WHERE (`SiteTree_Live`.RecordID = 24 AND `SiteTree_Live`.Version = 1) AND (`SiteTree_Live`.ClassName IN ('Product')) ORDER BY Sort | Unknown table 'Product_Live'
At line 397 in C:\xampp\htdocs\silverstripe\sapphire\core\model\Database.php

user_error(DATABASE ERROR: Couldn't run query: SELECT `SiteTree_Live`.*, `Product_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_Live_versions`.AuthorID, `SiteTree_Live_versions`.Version, `SiteTree_Live_versions`.RecordID AS ID FROM `SiteTree_Live` LEFT JOIN `Product_versions` ON `Product_versions`.RecordID = `SiteTree_Live_versions`.RecordID AND `Product_versions`.Version = `SiteTree_Live_versions`.Version WHERE (`SiteTree_Live`.RecordID = 24 AND `SiteTree_Live`.Version = 1) AND (`SiteTree_Live`.ClassName IN ('Product')) ORDER BY Sort | Unknown table 'Product_Live',256)
line 397 of Database.php

Database->databaseError(Couldn't run query: SELECT `SiteTree_Live`.*, `Product_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_Live_versions`.AuthorID, `SiteTree_Live_versions`.Version, `SiteTree_Live_versions`.RecordID AS ID FROM `SiteTree_Live` LEFT JOIN `Product_versions` ON `Product_versions`.RecordID = `SiteTree_Live_versions`.RecordID AND `Product_versions`.Version = `SiteTree_Live_versions`.Version WHERE (`SiteTree_Live`.RecordID = 24 AND `SiteTree_Live`.Version = 1) AND (`SiteTree_Live`.ClassName IN ('Product')) ORDER BY Sort | Unknown table 'Product_Live',256)
line 106 of MySQLDatabase.php

MySQLDatabase->query(SELECT `SiteTree_Live`.*, `Product_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_Live_versions`.AuthorID, `SiteTree_Live_versions`.Version, `SiteTree_Live_versions`.RecordID AS ID FROM `SiteTree_Live` LEFT JOIN `Product_versions` ON `Product_versions`.RecordID = `SiteTree_Live_versions`.RecordID AND `Product_versions`.Version = `SiteTree_Live_versions`.Version WHERE (`SiteTree_Live`.RecordID = 24 AND `SiteTree_Live`.Version = 1) AND (`SiteTree_Live`.ClassName IN ('Product')) ORDER BY Sort,256)
line 79 of DB.php

DB::query(SELECT `SiteTree_Live`.*, `Product_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_Live_versions`.AuthorID, `SiteTree_Live_versions`.Version, `SiteTree_Live_versions`.RecordID AS ID FROM `SiteTree_Live` LEFT JOIN `Product_versions` ON `Product_versions`.RecordID = `SiteTree_Live_versions`.RecordID AND `Product_versions`.Version = `SiteTree_Live_versions`.Version WHERE (`SiteTree_Live`.RecordID = 24 AND `SiteTree_Live`.Version = 1) AND (`SiteTree_Live`.ClassName IN ('Product')) ORDER BY Sort)
line 150 of SQLQuery.php

SQLQuery->execute()
line 642 of Versioned.php

Versioned::get_version(Product,24,1)
line 1005 of Order.php

Order_Item->__construct(Array)
line 1472 of DataObject.php

DataObject->buildDataObjectSet(MySQLQuery,DataObjectSet,SQLQuery,Order_Item)
line 1452 of DataObject.php

DataObject->instance_get(OrderID = 7,,,,DataObjectSet,)
line 1432 of DataObject.php

DataObject::get(Order_Item,OrderID = 7)
line 356 of Order.php

Order->itemsFromDatabase()
line 373 of Order.php

Order->Items()

call_user_func_array(Array,Array)
line 294 of ViewableData.php

ViewableData->obj(Items)
line 191 of .cacheC..xampp.htdocs.silverstripe.ecommerce.templates.email.Order_receiptEmail.ss

include(C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs-silverstripe\.cacheC..xampp.htdocs.silverstripe.ecommerce.templates.email.Order_receiptEmail.ss)
line 190 of SSViewer.php

SSViewer->process(ViewableData_Customised)
line 161 of Email.php

Email->parseVariables()
line 228 of Email.php

Email->send()
line 644 of Order.php

Order->sendEmail(Order_ReceiptEmail)
line 661 of Order.php

Order->sendReceipt()
line 238 of OrderForm.php

OrderForm->processOrder(Array,OrderForm)
line 197 of Controller.php

Controller->run(Array)
line 15 of ModelAsController.php

ModelAsController->run(Array)
line 76 of Director.php

Director::direct(/checkout/)
line 104 of main.php
Context
Debug (Debug::showError() in line 149 of Debug.php)

* msg =

Couldn't run query: SELECT `SiteTree_Live`.*, `Product_Live`.*, `SiteTree_Live`.ID, if(`SiteTree_Live`.ClassName,`SiteTree_Live`.ClassName,'SiteTree') AS RecordClassName, `SiteTree_Live_versions`.AuthorID, `SiteTree_Live_versions`.Version, `SiteTree_Live_versions`.RecordID AS ID FROM `SiteTree_Live` LEFT JOIN `Product_versions` ON `Product_versions`.RecordID = `SiteTree_Live_versions`.RecordID AND `Product_versions`.Version = `SiteTree_Live_versions`.Version WHERE (`SiteTree_Live`.RecordID = 24 AND `SiteTree_Live`.Version = 1) AND (`SiteTree_Live`.ClassName IN ('Product')) ORDER BY Sort | Unknown table 'Product_Live'

* errorLevel =

256

Avatar
quicked

Community Member, 32 Posts

16 January 2008 at 11:57am

or after changing country

FATAL ERROR: No form () returned by CheckoutPage_Controller->updateCountry
At line 157 in C:\xampp\htdocs\silverstripe\sapphire\core\control\Controller.php

user_error(No form () returned by CheckoutPage_Controller->updateCountry,512)
line 157 of Controller.php

Controller->run(Array)
line 15 of ModelAsController.php

ModelAsController->run(Array)
line 76 of Director.php

Director::direct(/checkout/)
line 104 of main.php
Context
Debug (Debug::showError() in line 149 of Debug.php)
Debug: all methods available in CheckoutPage_Controller

* $OrderContentSuccessful
* $OrderContentIncomplete
* $OrderPaymentInfo
* $DisplayOrder
* $DisplayFinalisedOrder
* $OrderSuccessful
* $OrderForm
* $ChangeCountry
* $ChangeCountry2
* $ChangeCountryForm
* $SearchForm
* $Link
* $RelativeLink
* $ChildrenOf
* $Page
* $Level
* $Menu
* $Section2
* $LoginForm
* $SilverStripeNavigator
* $PageComments
* $LangAttributes
* $Now
* $LinkTo
* $AbsoluteLink
* $CurrentMember
* $PastVisitor
* $PastMember
* $XML_val
* $RAW_val
* $SQL_val
* $JS_val
* $ATT_val
* $First
* $Last
* $FirstLast
* $MiddleString
* $Middle
* $Even
* $Odd
* $EvenOdd
* $Pos
* $TotalItems
* $HasPerm
* $BaseHref
* $Debug
* $CurrentPage
* $Top
* $ThemeDir

Debug: all fields available in CheckoutPage_Controller

* $ID
* $ClassName
* $Created
* $LastEdited
* $URLSegment
* $Title
* $MenuTitle
* $Content
* $MetaTitle
* $MetaDescription
* $MetaKeywords
* $ShowInMenus
* $ShowInSearch
* $HomepageForDomain
* $ProvideComments
* $Sort
* $LegacyURL
* $HasBrokenFile
* $HasBrokenLink
* $Status
* $ReportClass
* $Viewers
* $Editors
* $ViewersGroup
* $EditorsGroup
* $ParentID
* $Version
* $ExtraMeta
* $Priority
* $Price
* $Weight
* $Model
* $FeaturedProduct
* $AllowPurchase
* $ImageID
* $EmailTo
* $EmailOnSubmit
* $SubmitButtonText
* $OnCompleteMessage
* $Subscribe
* $AllNewsletters
* $Subject
* $PurchaseComplete
* $ChequeMessage
* $Date
* $Author
* $FirstName
* $Lastname
* $Nationality
* $MyStudentID
* $PhotoID
* $ErrorCode
* $LinkedPageID
* $RedirectionType
* $ExternalURL
* $LinkToID
* $VersionID
* $CopyContentFromID
* $RecordClassName

Debug: all methods available in CheckoutPage

* $Order
* $Link
* $AbsoluteLink
* $LinkOrCurrent
* $LinkOrSection
* $LinkingMode
* $ElementName
* $InSection
* $Comments
* $Breadcrumbs
* $NestedTitle
* $MetaTags
* $ContentSource
* $MultipleParents
* $TreeTitle
* $CMSTreeClasses
* $Now
* $LinkTo
* $CurrentMember
* $PastVisitor
* $PastMember
* $XML_val
* $RAW_val
* $SQL_val
* $JS_val
* $ATT_val
* $First
* $Last
* $FirstLast
* $MiddleString
* $Middle
* $Even
* $Odd
* $EvenOdd
* $Pos
* $TotalItems
* $HasPerm
* $BaseHref
* $CurrentPage
* $Top
* $ThemeDir

Debug: all fields available in CheckoutPage

* $ID
* $ClassName
* $Created
* $LastEdited
* $URLSegment
* $Title
* $MenuTitle
* $Content
* $MetaTitle
* $MetaDescription
* $MetaKeywords
* $ShowInMenus
* $ShowInSearch
* $HomepageForDomain
* $ProvideComments
* $Sort
* $LegacyURL
* $HasBrokenFile
* $HasBrokenLink
* $Status
* $ReportClass
* $Viewers
* $Editors
* $ViewersGroup
* $EditorsGroup
* $ParentID
* $Version
* $ExtraMeta
* $Priority
* $Price
* $Weight
* $Model
* $FeaturedProduct
* $AllowPurchase
* $ImageID
* $EmailTo
* $EmailOnSubmit
* $SubmitButtonText
* $OnCompleteMessage
* $Subscribe
* $AllNewsletters
* $Subject
* $PurchaseComplete
* $ChequeMessage
* $Date
* $Author
* $FirstName
* $Lastname
* $Nationality
* $MyStudentID
* $PhotoID
* $ErrorCode
* $LinkedPageID
* $RedirectionType
* $ExternalURL
* $LinkToID
* $VersionID
* $CopyContentFromID
* $RecordClassName

Debug: all methods available in CheckoutPage_Controller

* $OrderContentSuccessful
* $OrderContentIncomplete
* $OrderPaymentInfo
* $DisplayOrder
* $DisplayFinalisedOrder
* $OrderSuccessful
* $OrderForm
* $ChangeCountry
* $ChangeCountry2
* $ChangeCountryForm
* $SearchForm
* $Link
* $RelativeLink
* $ChildrenOf
* $Page
* $Level
* $Menu
* $Section2
* $LoginForm
* $SilverStripeNavigator
* $PageComments
* $LangAttributes
* $Now
* $LinkTo
* $AbsoluteLink
* $CurrentMember
* $PastVisitor
* $PastMember
* $XML_val
* $RAW_val
* $SQL_val
* $JS_val
* $ATT_val
* $First
* $Last
* $FirstLast
* $MiddleString
* $Middle
* $Even
* $Odd
* $EvenOdd
* $Pos
* $TotalItems
* $HasPerm
* $BaseHref
* $Debug
* $CurrentPage
* $Top
* $ThemeDir

Debug: all fields available in CheckoutPage_Controller

* $ID
* $ClassName
* $Created
* $LastEdited
* $URLSegment
* $Title
* $MenuTitle
* $Content
* $MetaTitle
* $MetaDescription
* $MetaKeywords
* $ShowInMenus
* $ShowInSearch
* $HomepageForDomain
* $ProvideComments
* $Sort
* $LegacyURL
* $HasBrokenFile
* $HasBrokenLink
* $Status
* $ReportClass
* $Viewers
* $Editors
* $ViewersGroup
* $EditorsGroup
* $ParentID
* $Version
* $ExtraMeta
* $Priority
* $Price
* $Weight
* $Model
* $FeaturedProduct
* $AllowPurchase
* $ImageID
* $EmailTo
* $EmailOnSubmit
* $SubmitButtonText
* $OnCompleteMessage
* $Subscribe
* $AllNewsletters
* $Subject
* $PurchaseComplete
* $ChequeMessage
* $Date
* $Author
* $FirstName
* $Lastname
* $Nationality
* $MyStudentID
* $PhotoID
* $ErrorCode
* $LinkedPageID
* $RedirectionType
* $ExternalURL
* $LinkToID
* $VersionID
* $CopyContentFromID
* $RecordClassName

Debug: all methods available in CheckoutPage

* $Order
* $Link
* $AbsoluteLink
* $LinkOrCurrent
* $LinkOrSection
* $LinkingMode
* $ElementName
* $InSection
* $Comments
* $Breadcrumbs
* $NestedTitle
* $MetaTags
* $ContentSource
* $MultipleParents
* $TreeTitle
* $CMSTreeClasses
* $Now
* $LinkTo
* $CurrentMember
* $PastVisitor
* $PastMember
* $XML_val
* $RAW_val
* $SQL_val
* $JS_val
* $ATT_val
* $First
* $Last
* $FirstLast
* $MiddleString
* $Middle
* $Even
* $Odd
* $EvenOdd
* $Pos
* $TotalItems
* $HasPerm
* $BaseHref
* $CurrentPage
* $Top
* $ThemeDir

Debug: all fields available in CheckoutPage

* $ID
* $ClassName
* $Created
* $LastEdited
* $URLSegment
* $Title
* $MenuTitle
* $Content
* $MetaTitle
* $MetaDescription
* $MetaKeywords
* $ShowInMenus
* $ShowInSearch
* $HomepageForDomain
* $ProvideComments
* $Sort
* $LegacyURL
* $HasBrokenFile
* $HasBrokenLink
* $Status
* $ReportClass
* $Viewers
* $Editors
* $ViewersGroup
* $EditorsGroup
* $ParentID
* $Version
* $ExtraMeta
* $Priority
* $Price
* $Weight
* $Model
* $FeaturedProduct
* $AllowPurchase
* $ImageID
* $EmailTo
* $EmailOnSubmit
* $SubmitButtonText
* $OnCompleteMessage
* $Subscribe
* $AllNewsletters
* $Subject
* $PurchaseComplete
* $ChequeMessage
* $Date
* $Author
* $FirstName
* $Lastname
* $Nationality
* $MyStudentID
* $PhotoID
* $ErrorCode
* $LinkedPageID
* $RedirectionType
* $ExternalURL
* $LinkToID
* $VersionID
* $CopyContentFromID
* $RecordClassName

* this =
* requestParams =
o url =

/silverstripe/checkout/

o executeForm =

updateCountry

o Country =

NC

o ShippingCountry =

NZ

o UseShippingAddress =

1

o SecurityID =

1572

o action_SaveCountry =

Save Country

* funcName =

SaveCountry

* paramVal =

Save Country

* paramName =

action_SaveCountry

* formController =
* form =

* formObjParts =
o 0 =

updateCountry

* formMethod =

updateCountry

Avatar
quicked

Community Member, 32 Posts

16 January 2008 at 12:47pm

I downloaded the latest svn and change country worked and i did the final checkout and got
Parse error: syntax error, unexpected '>' in C:\WINDOWS\Temp\silverstripe-cacheC--xampp-htdocs-silverstripe\.cacheC..xampp.htdocs.silverstripe.ecommerce.templates.email.Order_receiptEmail.ss on line 639

which i am now trying fix

Avatar
Delphinus

Community Member, 22 Posts

6 April 2008 at 11:31pm

Hi Quicked,

Did you make any progress on the
Parse error: syntax error, unexpected '>' in ..... Order_receiptEmail.ss
error?

Thread about it here too.
http://www.silverstripe.com/extending-hacking-silverstripe-forum/flat/41870

Avatar
quicked

Community Member, 32 Posts

8 April 2008 at 9:46am

Hi Delphinous,

It was so long ago i can't remember. My svn doesn't go that far back. Sorry, I should have posted a solution (if I found one).

quicked

Avatar
Delphinus

Community Member, 22 Posts

8 April 2008 at 9:49am

Hi Quicked,

Do you have it running now? If so could you please send me your templates folder? (Or tar/zip it up and attach to a post?

Thanks,
Delphinus

Avatar
superstyling

Community Member, 2 Posts

2 May 2008 at 12:57pm

I have the same error message as Richard had after clicking the "Place order and make payment" button on the checkout page. (SS v2.2.1 and Ecom v0.5.1).

Is there a fix for this Sam / Sigurd?

Sam, can you expand instructions on your post:

"The crux of the issue is that, if buildVersionSQL is being used, Versioned's rewriting of the table name (from SiteTree to SiteTree_Live) needs to be disabled.

The simplest solution is to temporarily clear Versioned::$reading_stage, before $this->owner->buildSQL() is called. That way, the '_Live' suffix won't get added.

See Versioned::writeToStage() for an example of how this is done."?

Thanks.

Avatar
Fishboy

7 Posts

13 May 2008 at 8:19pm

I am experiencing the same error as Richard after clicking the "Place order and make payment" button on the checkout page. (SS v2.2.1 and Ecom v0.5.1).

I tried the latest from SVN but things got a little messier.

Is there a fix, work-around or recommended series of curse-words for this situation?

Note: I'm not a developer. I can find my way around and replace a few lines of code but only with someone holding my hand.

Cheers.