- 
                Notifications
    
You must be signed in to change notification settings  - Fork 9.4k
 
Closed
Labels
Component: Bundled ExtensionIssue is caused by one of the bundled extensionsIssue is caused by one of the bundled extensionsEvent: webjumpIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedProgress: needs update
Description
Temando_Shipping extension that is included by default in Magento2 maps following paths in requirejs-config.js
var config = {
    paths: {
        temandoCheckoutFieldsDefinition: 'Temando_Shipping/js/model/fields-definition',
        temandoCustomerAddressRateProcessor: 'Temando_Shipping/js/model/shipping-rate-processor/customer-address',
        temandoNewAddressRateProcessor: 'Temando_Shipping/js/model/shipping-rate-processor/new-address',
        temandoShippingRatesValidator: 'Temando_Shipping/js/model/shipping-rates-validator/temando',
        temandoShippingRatesValidationRules: 'Temando_Shipping/js/model/shipping-rates-validation-rules/temando'
    },
    map: {
        'Magento_Checkout/js/model/shipping-rate-service': {
            'Magento_Checkout/js/model/shipping-rate-processor/customer-address' : 'temandoCustomerAddressRateProcessor',
            'Magento_Checkout/js/model/shipping-rate-processor/new-address' : 'temandoNewAddressRateProcessor'
        }
    }
};
this is included in all cases, if extension is configured to be actually used or just free-rides as a default enabled module after installation . So by purely existing in the system it affects core behaviour.
Preconditions
- Magento 2.2.4 with demo data
 - Temando_Shipping extension enabled by default but not configured as shipping method
 
Steps to reproduce
- On clean installation m2.2.4 with demo data
 - add stuff to cart and reach checkout
 - Temando_Shipping has mapped over some core js files even if not configured as a shipping method
 
Expected result
- No inclusion of what so ever Temando_Shipping as it is not enabled as a shipping method and has no legit reason to affect core functionality
 - even if included it should not redefine core functionality if method is not configured
 
Actual result
- Core js fiels are mapped and core behaviour is changed (how exactly it f*s up the defaults is currently not important)
 
ways to fix
- use mixins instead mapping
 - since m2 lacks a way to tie requirejs-config rules to be applied/tied to additional configuration rules (by admin config values / layout rules) validate the need of a mixin inside each method affected inside mixin
 - if no legit need for affecting behaviour return a default behaviour
 
Metadata
Metadata
Assignees
Labels
Component: Bundled ExtensionIssue is caused by one of the bundled extensionsIssue is caused by one of the bundled extensionsEvent: webjumpIssue: Format is validGate 1 Passed. Automatic verification of issue format passedGate 1 Passed. Automatic verification of issue format passedProgress: needs update