Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error when using export #29

Closed
PopaWeb opened this issue Mar 22, 2019 · 3 comments
Closed

Error when using export #29

PopaWeb opened this issue Mar 22, 2019 · 3 comments
Assignees
Labels
bug Something isn't working

Comments

@PopaWeb
Copy link

PopaWeb commented Mar 22, 2019

Description

Getting error when using the new export function:
Error Info: Array
(
[0] => 42S22
[1] => 1054
[2] => Unknown column 'enupalstripe_orders.id' in 'field list'
)

The SQL being executed was: SELECT enupalstripe_orders.id AS orderId, formId, userId, testMode, paymentType, number ...

Steps to reproduce

  1. Export > CSV

Additional info

  • Craft version: Craft Pro 3.1.19
  • PHP version: 7.2.16
  • Database driver & version: MySQL 5.7.25
  • Plugin version: 1.8.3
@PopaWeb
Copy link
Author

PopaWeb commented Mar 23, 2019

I have 9 subscriptions (transactions) in my list and when i want to export them, i clic Export > CSV, i got this page (message) in Craft:

PDOException: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enupalstripe_orders.id' in 'field list' in /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php:1290
Stack trace:
#0 /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php(1290): PDOStatement->execute()
#1 /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php(1158): yii\db\Command->internalExecute('SELECT `enupals...')
#2 /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /srv/users/rep/web/vendor/yiisoft/yii2/db/Query.php(237): yii\db\Command->queryAll()
#4 /srv/users/rep/web/vendor/craftcms/cms/src/db/Query.php(161): yii\db\Query->all(NULL)
#5 /srv/users/rep/web/vendor/enupal/stripe/src/services/Reports.php(72): craft\db\Query->all()
#6 /srv/users/rep/web/vendor/enupal/stripe/src/controllers/DownloadsController.php(49): enupal\stripe\services\Reports->getOrdersExportFile('csv', Object(DateTime), Object(DateTime), NULL)
#7 [internal function]: enupal\stripe\controllers\DownloadsController->actionExportOrder()
#8 /srv/users/rep/web/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /srv/users/rep/web/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /srv/users/rep/web/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('export-order', Array)
#11 /srv/users/rep/web/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('export-order', Array)
#12 /srv/users/rep/web/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('enupal-stripe/d...', Array)
#13 /srv/users/rep/web/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('enupal-stripe/d...', Array)
#14 /srv/users/rep/web/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#15 /srv/users/rep/web/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#16 /srv/users/rep/web/public/index.php(19): yii\base\Application->run()
#17 {main}

Next yii\db\Exception: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'enupalstripe_orders.id' in 'field list'
The SQL being executed was: SELECT `enupalstripe_orders`.`id` AS `orderId`, `formId`, `userId`, `testMode`, `paymentType`, `number`, `currency`, `totalPrice`, `tax`, `quantity`, `dateOrdered`, `stripeTransactionId`, `email`, `isCompleted`, `variants` AS `formFields`, `isSubscription`, `orderStatusId`, `dateRefunded`, `refunded`, `billingAddressId`, `shippingAddressId`, `enupalstripe_orders`.`dateCreated` AS `dateCreated`, `enupalstripe_orders`.`dateUpdated` AS `dateUpdated`, `billing_address`.`firstName` AS `billingAddressFirstName`, `billing_address`.`lastName` AS `billingAddressLastName`, `billing_address`.`address1` AS `billingAddressAddress1`, `billing_address`.`address2` AS `billingAddressAddress2`, `billing_address`.`zipCode` AS `billingAddressZipCode`, `billing_address`.`stateName` AS `billingState`, `billingCountries`.`name` AS `billingCountry`, `shipping_address`.`firstName` AS `shippingAddressFirstName`, `shipping_address`.`lastName` AS `shippingAddressLastName`, `shipping_address`.`address1` AS `shippingAddressAddress1`, `shipping_address`.`address2` AS `shippingAddressAddress2`, `shipping_address`.`zipCode` AS `shippingAddressZipCode`, `shipping_address`.`stateName` AS `shippingState`, `shippingCountries`.`name` AS `shippingCountry`
FROM `craft_enupalstripe_orders`
LEFT JOIN `craft_enupalstripe_addresses` `shipping_address` ON shipping_address.id = enupalstripe_orders.shippingAddressId
LEFT JOIN `craft_enupalstripe_addresses` `billing_address` ON billing_address.id = enupalstripe_orders.billingAddressId
LEFT JOIN `craft_enupalstripe_countries` `shippingCountries` ON shippingCountries.id = shipping_address.countryId
LEFT JOIN `craft_enupalstripe_countries` `billingCountries` ON billingCountries.id = billing_address.countryId
WHERE (`dateOrdered` >= '2019-03-15 04:00:00') AND (`dateOrdered` <= '2019-03-23 04:00:00') in /srv/users/rep/web/vendor/yiisoft/yii2/db/Schema.php:664
Stack trace:
#0 /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php(1295): yii\db\Schema->convertException(Object(PDOException), 'SELECT `enupals...')
#1 /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php(1158): yii\db\Command->internalExecute('SELECT `enupals...')
#2 /srv/users/rep/web/vendor/yiisoft/yii2/db/Command.php(399): yii\db\Command->queryInternal('fetchAll', NULL)
#3 /srv/users/rep/web/vendor/yiisoft/yii2/db/Query.php(237): yii\db\Command->queryAll()
#4 /srv/users/rep/web/vendor/craftcms/cms/src/db/Query.php(161): yii\db\Query->all(NULL)
#5 /srv/users/rep/web/vendor/enupal/stripe/src/services/Reports.php(72): craft\db\Query->all()
#6 /srv/users/rep/web/vendor/enupal/stripe/src/controllers/DownloadsController.php(49): enupal\stripe\services\Reports->getOrdersExportFile('csv', Object(DateTime), Object(DateTime), NULL)
#7 [internal function]: enupal\stripe\controllers\DownloadsController->actionExportOrder()
#8 /srv/users/rep/web/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#9 /srv/users/rep/web/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#10 /srv/users/rep/web/vendor/craftcms/cms/src/web/Controller.php(109): yii\base\Controller->runAction('export-order', Array)
#11 /srv/users/rep/web/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('export-order', Array)
#12 /srv/users/rep/web/vendor/craftcms/cms/src/web/Application.php(297): yii\base\Module->runAction('enupal-stripe/d...', Array)
#13 /srv/users/rep/web/vendor/craftcms/cms/src/web/Application.php(561): craft\web\Application->runAction('enupal-stripe/d...', Array)
#14 /srv/users/rep/web/vendor/craftcms/cms/src/web/Application.php(281): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#15 /srv/users/rep/web/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#16 /srv/users/rep/web/public/index.php(19): yii\base\Application->run()
#17 {main}
Additional Information:
Array
(
    [0] => 42S22
    [1] => 1054
    [2] => Unknown column 'enupalstripe_orders.id' in 'field list'
)

@andrelopez andrelopez added bug Something isn't working and removed need more info labels Mar 23, 2019
@andrelopez
Copy link
Member

Hi @PopaWeb

Thanks for following up. We just released Stripe Payments v1.8.4 with a fix for this issue. Could you please update your plugin and let us know if that fixed the error?

Best,

@PopaWeb
Copy link
Author

PopaWeb commented Mar 23, 2019

Hi @andrelopez

Great! The update fixed that issue... Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants