postnl / postnl-magento2

This is the official Magento 2 extension for the logistics company PostNL. Add shipping options and parcelshops to your checkout. Create labels with track and trace functionality from the backend.
59 stars 60 forks source link

[BUG] Validation failed for shipment - {[1900302] Country with address type receiver and sender is required} #300

Closed abvdveen closed 2 years ago

abvdveen commented 2 years ago

After updating to Magento 2.3.7-p3 and PostNL 1.12.0 I get these errors in debug.log when trying to generate a label:

`[2022-04-13 14:26:50] postnl_logging.DEBUG: <<< RESPONSE XML >>> <?xml version="1.0" encoding="UTF-8"?>

s:CIF Framework Message Interceptor
  <faultstring xml:lang="en-US">Check CIFException in the detail section</faultstring>
  <detail>
    <CifException xmlns="http://postnl.nl/cif/services/common/">
      <Errors>
        <ExceptionData>
          <Description i:nil="true"/>
          <ErrorMsg>Validation failed for shipment: 3SDLXQ1141276, Messages:
            3SDLXQ1141276: {[1900302] Country with address type receiver and sender is required}
        </ErrorMsg>
          <ErrorNumber>1900302</ErrorNumber>
        </ExceptionData>
      </Errors>
    </CifException>
  </detail>
</s:Fault>

</s:Body> </s:Envelope> [] [] [2022-04-13 14:26:50] postnl_logging.DEBUG: Invalid generateLabel response: [] []`

Also, the admin section is empty - will submit a separate bug report for that.

Magento: 2.3.7-p3 PostNL: 1.12.0 PHP 7.3.31

tig-jeffreybranderhorst commented 2 years ago

Hi @abvdveen,

Thank you for contacting us, we have not released a version yet that supports the newest Magento's versions because we need to test it before releasing the new version. Thank you again for already submitting this, I will place it on the backlog, so we can fix this for the new release.

Have a great day, Jeffrey

soft4net commented 2 years ago

Hello @abvdveen , what helped me was going to PostNL admin page (/admin/system_config/edit/section/tig_postnl/) and save configuration. I'm guessing, new version might missed some settings in configuration. I have Magento 2.4.3, PostNL 1.12.1. Maybe this information might help track potential error. Thank you.

JoostWan commented 2 years ago

We also have this problem. Thanks @soft4net for the information. Saved the config and it's working now.

Issue:

Notice: Undefined index: country in /vendor/tig/postnl-magento2/Helper/DeliveryOptions/OrderParams.php on line 247

After saving the config this entry is saved to core_config_data tig_postnl/generalconfiguration_shipping_address/country

tig-jeffreybranderhorst commented 2 years ago

Hi @soft4net and @JoostWan ,

Thank you for sharing a work a round! It is a quick fix to be able to continue!
I will update the backlog issue with your findings, so after updating you won't have to save the keys again.

Have a great day, Jeffrey

tig-vincentthart commented 2 years ago

Hi @soft4net and @JoostWan ,

We just released v1.12.2 with support for the latest Magento versions. Does this resolve the issues you faced?

Have a nice day! Vincent

abvdveen commented 2 years ago

Updated to v1.12.2 on Magento 2.3.7-p3 and seems fine.

tig-jeffreybranderhorst commented 2 years ago

Hi @abvdveen ,

Good to read! Thank you for the update.

Have a great day, Jeffrey