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":"Getting unknown property: craft\\commerce\\elements\\Variant::"} #62

Open
terryupton opened this issue Jan 28, 2025 · 1 comment
Assignees

Comments

@terryupton
Copy link

Had Ship Station running fine.
I updated the feed to include the telephone number and getting this error;
{"error":"Getting unknown property: craft\\commerce\\elements\\Variant::"}
removed and rolled back the change but I am still getting this 500 error when the feed tries to run.

When I check thew logs I am seeing these errors:

2025-01-28 15:41:30 [web.ERROR] [fostercommerce\shipstationconnect\controllers\OrdersController::logException] Error processing action export {"memory":6920248} 
2025-01-28 15:41:30 [web.ERROR] [yii\base\UnknownPropertyException] Getting unknown property: craft\commerce\elements\Variant:: {"trace":["#0 /home/ploi/www.pcdparts.co.uk/vendor/craftcms/cms/src/base/Element.php(2206): yii\\base\\Component->__get()","#1 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(230): craft\\base\\Element->__get()","#2 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(588): fostercommerce\\shipstationconnect\\services\\Xml->fostercommerce\\shipstationconnect\\services\\{closure}()","#3 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(539): fostercommerce\\shipstationconnect\\services\\Xml->valueFromMappingAndModel()","#4 
/home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(248): fostercommerce\\shipstationconnect\\services\\Xml->mapCraftModel()","#5 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(173): fostercommerce\\shipstationconnect\\services\\Xml->item()","#6 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(124): fostercommerce\\shipstationconnect\\services\\Xml->items()","#7 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/services/Xml.php(45): fostercommerce\\shipstationconnect\\services\\Xml->order()","#8 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/controllers/OrdersController.php(156): fostercommerce\\shipstationconnect\\services\\Xml->orders()","#9 /home/ploi/www.pcdparts.co.uk/vendor/fostercommerce/shipstationconnect/src/controllers/OrdersController.php(67): fostercommerce\\shipstationconnect\\controllers\\OrdersController->getOrders()","#10 [internal function]: 
fostercommerce\\shipstationconnect\\controllers\\OrdersController->actionProcess()","#11 /home/ploi/www.pcdparts.co.uk/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","#12 /home/ploi/www.pcdparts.co.uk/vendor/yiisoft/yii2/base/Controller.php(178): yii\\base\\InlineAction->runWithParams()","#13 /home/ploi/www.pcdparts.co.uk/vendor/yiisoft/yii2/base/Module.php(552): yii\\base\\Controller->runAction()","#14 /home/ploi/www.pcdparts.co.uk/vendor/craftcms/cms/src/web/Application.php(341): yii\\base\\Module->runAction()","#15 /home/ploi/www.pcdparts.co.uk/vendor/craftcms/cms/src/web/Application.php(640): craft\\web\\Application->runAction()","#16 /home/ploi/www.pcdparts.co.uk/vendor/craftcms/cms/src/web/Application.php(303): craft\\web\\Application->_processActionRequest()","#17 /home/ploi/www.pcdparts.co.uk/vendor/yiisoft/yii2/base/Application.php(384): craft\\web\\Application->handleRequest()","#18 /home/ploi/www.pcdparts.co.uk/web/index.php(12): yii\\base\\Application->run()","#19 {main}"],"memory":6920464,"exception":"[object] (yii\\base\\UnknownPropertyException(code: 0): Getting unknown property: craft\\commerce\\elements\\Variant:: at /home/ploi/www.pcdparts.co.uk/vendor/yiisoft/yii2/base/Component.php:154)"} 

Any ideas on how to resolve this?

@terryupton
Copy link
Author

I have found the problem! For anyone else how might come across this issue in Shipstation v2.1.0....

If the field for Product Images Field Handle is left as none then it the feed breaks.

Image

I rolled back to v2.0.4 and it worked ok.
Checking the changelog.
2.0.4...2.1.0

So upgraded again and set the handle for the image and the export worked again.

I can see this was introduced in 2.1.0 - upon setting this field the export works again.
I have also posted this to a gihub issue - but heads up as you might nee do get this fixed ASAP, in case others hit problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants