Skip to content

Js mixins, path mappings are applied even if modules are not used but are enabled #15967

Open
@speedupmate

Description

@speedupmate

Js mixins and/or path mappings are applied even if modules are not used but are enabled. For example Magento 2 ships with Temando_Shipping extension , this defines mappings on few js files.

If Temando_Shipping is not configured from admin to be used on frontend , mappings still apply and affect the original behaviour that is needed when extension is not configured to be used.

Of course Temando_Shipping is just an example here , same applies to every mixin/mapping defined for any included extension in requirejs-config.js

Preconditions

  1. All Magento 2 versions

Steps to reproduce

  1. Install Magento with demo data 2.2.4 (don't configure Temando_Shipping)
  2. Add stuff to cart , reach checkout
  3. Temando_Shipping module mappings are active in checkout even if module is not enabled (not even arguing what issues it creates, but just to illustrate)

Expected result

  1. If extension is not configured to be used, we expect that it does not affect whatever is target for a mixin cause there is no need for customisation
  2. There needs to be a way to tie mixin enabling to configuration status not just enabled/disabled status of whole module. There might even be a need for more precise control on when mixins/mappings are applied by the area extension customises (by layout handler etc)

Actual result

  1. Temando_Shipping module mappings are active in checkout even if shipping method is not enabled from configuration.
  2. Dependant on developer skill or amount of methods altered this affects other extensions or even default modules to work as expected

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: OtherIssue: ConfirmedGate 3 Passed. Manual verification of the issue completed. Issue is confirmedPriority: P4No current plan to fix. Fixing can be deferred as a logical part of more important work.Progress: ready for groomingReproduced on 2.2.xThe issue has been reproduced on latest 2.2 releaseReproduced on 2.3.xThe issue has been reproduced on latest 2.3 releaseSeverity: S4Affects aesthetics, professional look and feel, “quality” or “usability”.Triage: Dev.ExperienceIssue related to Developer Experience and needs help with Triage to Confirm or Reject itfeature request

    Type

    No type

    Projects

    Status

    Ready for Grooming

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions