ethercreative / mailchimp-commerce

Mailchimp integration with Craft Commerce
Other
5 stars 11 forks source link

Error trying to Sync some Products #9

Closed steve-holland closed 5 years ago

steve-holland commented 5 years ago

We've got the Store Sync'd, in as much as some products are appearing in Mailchimp and new Orders are getting to Mailchimp too. Our issue is that not all of the Products are making their way there. When I try to sync a specific Product Type we get the following in the queue.log...

2019-08-16 11:01:14 - error - mailchimp-commerce
{"type":"http://developer.mailchimp.com/documentation/mailchimp/guides/error-glossary/","title":"Invalid Resource","status":400,"detail":"The resource submitted could not be validated. For field-specific details, see the 'errors' array.","instance":"15019056-dcd0-4318-ade5-94dc11d4c379","errors":[{"field":"url","message":"Schema describes string, NULL found instead"}]}
2019-08-16 11:01:14 - error - craft\queue\QueueLogBehavior::afterError
 [4668] Syncing Products to Mailchimp (attempt: 1) - Error (time: 22.666s): Failed to sync product
2019-08-16 11:01:14 - error - craft\db\QueryAbortedException
craft\db\QueryAbortedException: Failed to sync product in /.../.../.../.../.../vendor/ether/mailchimp-commerce/src/jobs/SyncProducts.php:55
Stack trace:
#0 /.../.../.../.../.../vendor/yiisoft/yii2-queue/src/Queue.php(214): ether\mc\jobs\SyncProducts->execute(Object(craft\queue\Queue))
#1 /.../.../.../.../.../vendor/yiisoft/yii2-queue/src/cli/Queue.php(147): yii\queue\Queue->handleMessage('4668', 'O:26:"ether\\mc\\...', '300', 1)
#2 /.../.../.../.../.../vendor/craftcms/cms/src/queue/Queue.php(96): yii\queue\cli\Queue->handleMessage('4668', 'O:26:"ether\\mc\\...', '300', 1)
#3 /.../.../.../.../.../vendor/craftcms/cms/src/controllers/QueueController.php(86): craft\queue\Queue->run()
#4 [internal function]: craft\controllers\QueueController->actionRun()
#5 /.../.../.../.../.../vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#6 /.../.../.../.../.../vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#7 /.../.../.../.../.../vendor/craftcms/cms/src/web/Controller.php(187): yii\base\Controller->runAction('run', Array)
#8 /.../.../.../.../.../vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('run', Array)
#9 /.../.../.../.../.../vendor/craftcms/cms/src/web/Application.php(299): yii\base\Module->runAction('queue/run', Array)
#10 /.../.../.../.../.../vendor/craftcms/cms/src/web/Application.php(566): craft\web\Application->runAction('queue/run', Array)
#11 /.../.../.../.../.../vendor/craftcms/cms/src/web/Application.php(278): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#12 /.../.../.../.../.../vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#13 /.../.../.../.../.../public/index.php(21): yii\base\Application->run()
#14 {main}

It seems to be related to a url no being populated on the API call. Not sure if this is a setup issue, or something more serious. Any help would be gratefully received.

Tam commented 5 years ago

@codebysubtract Do all your products have public URLs?

steve-holland commented 5 years ago

@Tam These particular ones don’t, they’re sample products. So that looks like the culprit then. Not sure how we’ll sort that out. We do need them to end up in Mailchimp as we want to send out follow up emails. Thanks for getting back to me though. If you don’t mind, can we keep this open until Monday, so I can just try it out?