tig-nl/gls-magento2

[BUG] Trying to get property 'deliveryAddress' of non-object

Closed this issue · 12 comments

To Reproduce
Steps to reproduce the behavior:
got to order
try to create shipping label

Expected result
A clear and concise description of what you expected to happen.
creating a shipping label

Actual result
Describe the actual result
when trying to create a shipping label for a order i get this error:
{"0":"Notice: Trying to get property 'deliveryAddress' of non-object in /var/www/vhosts/shoes.nl/httpdocs/vendor/tig/gls-magento2/Service/Label/Create.php on line 156","1":"#1 TIG\GLS\Service\Label\Create->mapLabelData(&Magento\Sales\Model\Order\Shipment\Interceptor#000000003f3368ff0000000038859bdd#, 'TIG_GLS', 1.1)

Workaround
Describe the temporarily workaround or if none exists write "None"
no workarround

Screenshots
If applicable, add screenshots to help explain your problem.

** Please complete the following information**
Magento 2.3.5p1
PHP 7.2.34
1.3.5

Hi @albundy2 ,

Thanks for letting us know. I've just tried to reproduce this but nothing goes wrong when I try to create a label.
Seems like there is something not right with the delivery address. Is there anything strange you see when it comes to that? Is there a screenshot you could share maybe?

Kind regards,
Jasper
TIG

it's a address in Czech Republic, It has special characters but i have remove those and also put the address number on address lne 2 but the problem stays the same after retrying

is no longer need please delete the contact address information i have send in screenshot

Hi @albundy2 ,

I've deleted the image. Tried to checkout with that and I was able to generate a label.
Probably something else going on here. I would recommend contacting GLS support about this and follow the regular support route when it comes to this problem.

Kind regards,
Jasper
TIG

Hi Jasper,

done this on monday no answer or reply. Can it be that there is a issue because i also use TIG PostNL module in the same website?

Hi @albundy2 ,

I've tested this on my environment with both GLS and PostNL active. I did this because your previous case also concerned the two extensions being installed. Or were you only able to replicate this with both extensions active?

Kind regards,
Jasper
TIG

PostNL plugin is working without problems and it isn't making any differents if it is enable or not for the result of GLS create labels. I have removed the GLS Plugin on my staging website through composer upgrade, compile and deploy and then done a new install through composer but the result stays the same. The GLS plugin is working except creating labels given errors

Hi @albundy2 ,

It might be better to handle this as an individual case. Because it doesn't seem like a core problem with the extension since I was unable to reproduce it. Could you contact us through support@tig.nl? We will look into it specifically for your environment. I'll close this one once you agree on try the solve the case like that.

Kind regards,
Jasper
TIG

Hi @albundy2 ,

It is been a while and I don't see your issue open anymore. So I will also close this issue on github. But if you ever need help don't hesitate to contact us at support@tig.nl!

Have a great day,
Jeffrey

I have the same issue. Did you ever get this resolved @albundy2 ?

It seems to be related to using Amasty One Step Checkout extension.