-
-
Notifications
You must be signed in to change notification settings - Fork 18
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
Invalid package types on Bring - and no results from Bring request #125
Comments
The HeadersAlreadySentException seems to be triggered by postie config's displayDebug or displayErrors. |
Some of these are valid products, but may not be available for your cart or Bring account. For example
So these are still valid products, but don't always return a rate - and that's fine. Having said that, it looks like they've deprecated the handles for a number of products, and are going with numerical ones now. As such, we need to update our services list. Updated for the next release. To get this early, run But yes, we have plans to provide better error/debug feedback that's not going to mess with the page output. That's coming in Postie v4. |
Thanks for the update. I still don't get any package options back from Bring. When I debug the ShippingMethods.php-file, I see getMatchingShippingMethods is called multiple times. The first time it returns a list of shipping methods from the Bring API: Second time too: The fourth time it's gone: When I inspect the $order-object, I see the the _lineItems is empty, which is probably the reason no shipping methods are returned: Which I also can see int he postie log file:
(btw, here is a dump of rate errors):
So anyway. Do you know why this happens - and is it related to Postie, or is it a Commerce bug? |
That seems extremely strange that line items are suddenly going missing. Certainly not happening on my end: This is what appears for me with the debug addresses un-commented. The log file also looks reasonable, as a lot of services aren't applicable. I've just added missing dimensions to packages which is showing an error for some products. |
Describe the bug
Seems you're requesting some package types that don't exist on Bring anymore:
When I turn off these and just request the rest of the package types, I get only:
... and as you see, no available package types.
When I go back and into freight selection again, I get this error:
"Bring: Sending payload:
{"consignments":[{"id":"1","fromCountryCode":"NO","fromPostalCode":"6230","toCountryCode":"NO","toPostalCode":"6230","packages":[{"grossWeight":2300,"id":"1"}],"products":[{"id":"SERVICEPAKKE"},{"id":"PA_DOREN"},{"id":"BPAKKE_DOR-DOR"}]}],"postingAtPostoffice":false}
."An Error occurred while handling another error:
yii\web\HeadersAlreadySentException: Headers already sent in /var/www/html/vendor/symfony/var-dumper/Dumper/AbstractDumper.php on line 171. in /var/www/html/vendor/yiisoft/yii2/web/Response.php:369
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/web/Response.php(342): yii\web\Response->sendHeaders()
#1 /var/www/html/vendor/yiisoft/yii2/web/ErrorHandler.php(136): yii\web\Response->send()
#2 /var/www/html/vendor/craftcms/cms/src/web/ErrorHandler.php(192): yii\web\ErrorHandler->renderException(Object(yii\web\HeadersAlreadySentException))
#3 /var/www/html/vendor/yiisoft/yii2/base/ErrorHandler.php(152): craft\web\ErrorHandler->renderException(Object(yii\web\HeadersAlreadySentException))
#4 /var/www/html/vendor/craftcms/cms/src/web/ErrorHandler.php(66): yii\base\ErrorHandler->handleException(Object(yii\web\HeadersAlreadySentException))
#5 [internal function]: craft\web\ErrorHandler->handleException(Object(yii\web\HeadersAlreadySentException))
#6 {main}
Previous exception:
yii\web\HeadersAlreadySentException: Headers already sent in /var/www/html/vendor/symfony/var-dumper/Dumper/AbstractDumper.php on line 171. in /var/www/html/vendor/yiisoft/yii2/web/Response.php:369
Stack trace:
#0 /var/www/html/vendor/yiisoft/yii2/web/Response.php(342): yii\web\Response->sendHeaders()
#1 /var/www/html/vendor/yiisoft/yii2/base/Application.php(390): yii\web\Response->send()
#2 /var/www/html/web/index.php(21): yii\base\Application->run()
#3 {main}
Steps to reproduce
Craft CMS version
Latest
Plugin version
Latest
Multi-site?
Yes
Additional context
No response
The text was updated successfully, but these errors were encountered: