webdna / commerce-admin-orders

Create a new commerce order from the admin
Other
9 stars 1 forks source link

Incompatibility with Verbb Events ticket sales plugin #13

Closed chadcrowell closed 4 years ago

chadcrowell commented 4 years ago

I had this installation and had never gotten this error: CMS: 3.1.31 Commerce: 2.1.7 Admin Orders: 2.4.0 Events: 1.1.1

now with this set of software: CMS: 3.1.3 Commerce: 2.1.13 Admin Orders: 2.5.0 Events: 1.1.6

I get the following error when trying to create an admin order in the Control Panel:

Next Twig\Error\RuntimeError: An exception has been thrown during the rendering of a template ("Getting unknown property: kuriousagency\commerce\adminorders\elements\Ticket::stock"). in /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/templates/_elements/tableview/elements.html:25
Stack trace:
#0 /home/swishvps/dev.stemplecreek.com/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#1 /home/swishvps/dev.stemplecreek.com/storage/runtime/compiled_templates/c2/c22b3d47c3994b58853cdf7d7ad5e82fd30343fb8b0b095cea899dbb79f720eb.php(96): Twig\Template->display(Array)
#2 /home/swishvps/dev.stemplecreek.com/vendor/twig/twig/src/Template.php(407): __TwigTemplate_77f63915bad4da66342e8e5d17c2944d96cba3038582e3621909f4b0d424bc91->doDisplay(Array, Array)
#3 /home/swishvps/dev.stemplecreek.com/vendor/twig/twig/src/Template.php(380): Twig\Template->displayWithErrorHandling(Array, Array)
#4 /home/swishvps/dev.stemplecreek.com/vendor/twig/twig/src/Template.php(392): Twig\Template->display(Array)
#5 /home/swishvps/dev.stemplecreek.com/vendor/twig/twig/src/TemplateWrapper.php(45): Twig\Template->render(Array, Array)
#6 /home/swishvps/dev.stemplecreek.com/vendor/twig/twig/src/Environment.php(318): Twig\TemplateWrapper->render(Array)
#7 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/web/View.php(344): Twig\Environment->render('_elements/table...', Array)
#8 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/base/Element.php(473): craft\web\View->renderTemplate('_elements/table...', Array)
#9 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(442): craft\base\Element::indexHtml(Object(verbb\events\elements\db\TicketQuery), Array, Array, '*', 'index', true, false)
#10 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/controllers/ElementIndexesController.php(122): craft\controllers\ElementIndexesController->elementResponseData(true, true)
#11 [internal function]: craft\controllers\ElementIndexesController->actionGetElements()
#12 /home/swishvps/dev.stemplecreek.com/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#13 /home/swishvps/dev.stemplecreek.com/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#14 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('get-elements', Array)
#15 /home/swishvps/dev.stemplecreek.com/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('get-elements', Array)
#16 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('element-indexes...', Array)
#17 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/web/Application.php(566): craft\web\Application->runAction('element-indexes...', Array)
#18 /home/swishvps/dev.stemplecreek.com/vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#19 /home/swishvps/dev.stemplecreek.com/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#20 /home/swishvps/dev.stemplecreek.com/public_html/index.php(21): yii\base\Application->run()
#21 {main}
2019-09-12 15:52:06 [-][1][-][info][application] $_GET = [
    'p' => 'admin/actions/element-indexes/get-elements'
]

Any chance you can setup some compatibility with those event tickets?

samuelbirch commented 4 years ago

yes, leave it with me.

samuelbirch commented 4 years ago

this is now fixed in 2.5.1

chadcrowell commented 4 years ago

Hi Sam - thanks so much. I am not sure if this is related, but since upgrading to fix the Events issue, I can't get products or tickets to add to cart. https://d.pr/i/qKgB6p

samuelbirch commented 4 years ago

HI Chad - Products are adding to the cart fine in my tests - can you send me the error that you are getting (that 500 server error)

I have noticed that if a ticket quantity is not set then you can't add a ticket to the cart, this is a events plugin bug for which i have raised an issue: https://github.com/verbb/events/issues/27

chadcrowell commented 4 years ago

Here is the expanded view in the console: https://d.pr/i/puo7Sl

When I copy the XHR response from /admin/commerce-admin-orders/orders/products it says {"error":"Undefined variable: cart"} - there's nothing in the web.log, php, or apache log that I can see.