Closed boris1988 closed 2 years ago
Hi @boris1988 ,
Thank you for this perfect filled out template! We will investigate this further, thank you for the submission!
Have a great day. Jeffrey
Hi @boris1988 ,
Do you have an example address for us where we can test with? Because I cannot reproduce it until now. So I would like to test with address where this happens with.
Have a great day, Jeffrey
Hi @tig-jeffreybranderhorst I cant get pick up points today But you can check the address on a screenshot I don't know why but today pickup points are not available Regards, Boris
Hi Boris,
Just tested and the pickup points should still work there is no server-side error so far we can see, we also get responses when we test. PostNL does the support themselves and if needed they ask us for more info and to help them, with that said could you please contact PostNL about these 2 issues, so we can fix it for you, because it seems I cannot reproduce it on our test environments. You can contact PostNL at digitaleklantsupport@postnl.nl
Have a great day, Jeffrey
HI @tig-jeffreybranderhorst I have reproduced it again Arent Krijtsstraat 15 DIEMEN throw an error because we don't have House Nr. Ext.
Diemerplein 34 -36 Diemen works fine. House Nr. Ext. -36 Regards, Boris
Hey @boris1988 ,
Maybe it is a combination with a other extension on your site. Because we don't get this error:
It is possible to maybe update the PostNL extension on a staging?
Have a great day, Jeffrey
PHP Version 7.4.19 magento 2.4.3
I will ask about access to staging Also, I can try to update Postnl to the latest one 1.9.9 Could you pls show the function vendor/magento/module-customer/Model/Address/AbstractAddress.php::_implodeArrayValues
{
if (is_array($value)) {
if (!count($value)) {
return '';
}
$isScalar = true;
foreach ($value as $val) {
if (!is_scalar($val)) {
$isScalar = false;
break;
}
}
if ($isScalar) {
$value = trim(implode("\n", $value));
}
}
return $value;
}
Hi @boris1988 ,
I'm testing on the same Magento version, so this will be the same. This is possibly fixed in the newest PostNL version therefore you can test that on a staging. If that is not it, it would need to be investigated and for that I would like to ask you to contact PostNL, you can contact them on: digitaleklantsupport@postnl.nl
The function: `if (is_array($value)) { if (!count($value)) { return ''; }
$isScalar = true;
foreach ($value as $val) {
if (!is_scalar($val)) {
$isScalar = false;
break;
}
}
if ($isScalar) {
$value = trim(implode("\n", $value));
}
}
return $value;
}`
Have a great day, Jeffrey
Thanks for the update
Hi @tig-jeffreybranderhorst Issue solved in the newest version Thanks
Sometimes I got a 500 error for action postnl/deliveryoptions/save/
To Reproduce Steps to reproduce the behavior:
Expected result postnl/deliveryoptions/save/ should return 200 status and pick up point saved
Actual result postnl/deliveryoptions/save/ return 500 status with the error Exception #0 (Exception): Notice: Array to string conversion ...
Workaround I got an error only for pick-up points without House Nr. Ext. The issue was caused by vendor/tig/postnl-magento2/Helper/DeliveryOptions/PickupAddress.php::164 and vendor/magento/module-customer/Model/Address/AbstractAddress.php::_implodeArrayValues. According to PickupAddress.php we can get NULL in the last element in Street Array. NULL is not a scalar value, AbstractAddress.php::_implodeArrayValues return array instead of string. Solution: change the default value to empty string instead of NULL
Please complete the following information