shipperhq / module-shipper

Base ShipperHQ Repo
Open Software License 3.0
21 stars 21 forks source link

Carriers logos are not displayed on shipping step #73

Closed oneNevan closed 4 years ago

oneNevan commented 4 years ago

Preconditions

  1. Magento v2.3.3 or 2.2.10
  2. shipperhq/module-shipper v20.31.6

Steps to reproduce

  1. Install, enable and configure Shipper HQ module
  2. Add not virtual product(s) to cart
  3. Navigate to shipping step on checkout
  4. Fill in address data to collect shipping rates

Expected result

  1. Shipping rates (methods) are displayed with carrier logos
  2. No javascript errors in browser console

Actual result

  1. There is an uncaught error thrown on this line https://github.com/shipperhq/module-shipper/blob/20.31.6/src/view/frontend/web/js/model/shipping-service-mixin.js#L93 shipperhq-carrier-logos-issue
  2. Carrier logos are not displayed shipperhq-carrier-logos-missing

Description

This issue is caused by changes in magento framework added in 2.3.3 and 2.2.10, see this line https://github.com/magento/magento2/commit/f16692c020ad34d1cff7e4489799a2c33dfde995#diff-8575fd5827f2060a08d2189bb08361efR346

So as a result link added here https://github.com/shipperhq/module-shipper/blob/master/src/view/frontend/layout/checkout_index_index.xml#L13 gets rendered as <link rel="preload" as="font" crossorigin="anonymous" href="http://domain.com/static/frontend/Vendor/theme/en_US/ShipperHQ_Shipper/images/carriers" /> but should look like <link rel="shq-carriers-logos-path" href="http://domain.com/static/frontend/Vendor/theme/en_US/ShipperHQ_Shipper/images/carriers" />

IMHO: It looks like a magento core bug more then shipper HQ bug since now Magento replaces assets attributes if $contentType is not defined (empty string), but anyway this is incompatibility with the latest version of magento

wsajason commented 4 years ago

Hi. Thank you for the detailed explanation. Our developers have resolved this in v20.34.1. Updating to the latest version should resolve.