webdna / commerce-admin-orders

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

Trying to get property of non-object #4

Closed MaximilianSchwarz closed 5 years ago

MaximilianSchwarz commented 5 years ago

If i want to create a new backend order and i click on new order. After that i choose a customer and click next. I got the following error:

Trying to get property of non-object

I used the Craft CMS 3.2.2. In the attachment you can see a screenshot. Bildschirmfoto 2019-07-16 um 13 51 41

samuelbirch commented 5 years ago

Hi,

What version of commerce have you got installed?

MaximilianSchwarz commented 5 years ago

I used the newest one. It's the Version 2.4.0

samuelbirch commented 5 years ago

Sorry, what version of craft commerce do you have installed?

MaximilianSchwarz commented 5 years ago

Also the newest one 2.1.10

samuelbirch commented 5 years ago

can you send your log file please or the stack trace of that issue.

MaximilianSchwarz commented 5 years ago

Here is the stack trace of that issue. I think the $order is no object.

http://yii\base\ErrorException: Trying to get property of non-object in /var/www/local.sandoro.craft/vendor/kuriousagency/commerce-admin-orders/src/controllers/OrdersController.php:66 Stack trace: #0 /var/www/local.sandoro.craft/vendor/yiisoft/yii2/base/InlineAction.php(57): kuriousagency\commerce\adminorders\controllers\OrdersController->actionProducts() #1 /var/www/local.sandoro.craft/vendor/yiisoft/yii2/base/InlineAction.php(57): ::call_user_func_array:{/var/www/local.sandoro.craft/vendor/yiisoft/yii2/base/InlineAction.php:57}() #2 /var/www/local.sandoro.craft/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams() #3 /var/www/local.sandoro.craft/vendor/craftcms/cms/src/web/Controller.php(187): kuriousagency\commerce\adminorders\controllers\OrdersController->runAction() #4 /var/www/local.sandoro.craft/vendor/yiisoft/yii2/base/Module.php(528): kuriousagency\commerce\adminorders\controllers\OrdersController->runAction() #5 /var/www/local.sandoro.craft/vendor/craftcms/cms/src/web/Application.php(298): craft\web\Application->runAction() #6 /var/www/local.sandoro.craft/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction() #7 /var/www/local.sandoro.craft/vendor/craftcms/cms/src/web/Application.php(283): craft\web\Application->handleRequest() #8 /var/www/local.sandoro.craft/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest() #9 /var/www/local.sandoro.craft/web/index.php(21): craft\web\Application->run() #10 {main}

samuelbirch commented 5 years ago

can you see in the request parameters if orderNumber is in there?

MaximilianSchwarz commented 5 years ago

orderNumber is {number}

samuelbirch commented 5 years ago

hmm, looks like the orderNumber is not being rendered as part of the return url.

Are you able to email your db and composer file to support @ kurious.agency and we'll take a look further.

MaximilianSchwarz commented 5 years ago

Send you the db and composer file.

samuelbirch commented 5 years ago

ok, looks like the cpUrl twig function is now encoding the twig params. I don't know when this changed?

This should be fixed in version 2.4.2 - can you let me know if it works for you?

MaximilianSchwarz commented 5 years ago

Thanks for the fast support. Now it works like a charm!