Skip to main content
13 votes

What's a hard dependency and what's a soft dependency?

A simple and clear explanation (from the Magento U fundamentals course): Hard dependency Implies that a module cannot function without the other modules on which it depends. Example of hard ...
Raphael at Digital Pianism's user avatar
13 votes
Accepted

What's a hard dependency and what's a soft dependency?

There are three different dependency parsers (implementations of Magento\Setup\Module\Dependency\ParserInterface): code: looks for classes used in code config/xml: looks for dependencies in module ...
Fabian Schmengler's user avatar
13 votes
Accepted

Magento2 - override 3rd party module layout file in custom theme

In your custom theme, follow this to override the layout file app/design/frontend/Theme_Vendor/Theme_Name/ThirdPartyVendor_ModuleName/layout/file_to_override.xml After doing this, remove the ...
Rishabh Rai's user avatar
12 votes
Accepted

Admin config: show field depending on selected multiselect values

Reason for The Issue The issue you are facing is related to Javascript functionality for getting value of a multiselect attribute. Magento's dependable fields are based on Javascript. They creates a ...
Jaimin Sutariya's user avatar
7 votes

Magento 2 Conflicting component dependencies (Fooman)

Short answer in your Magento root folder run the following command composer config repositories.foomanartifacts artifact $(pwd)/vendor/fooman/packages Long answer We create a local repository for ...
Kristof at Fooman's user avatar
4 votes

Dependecy error Magento 2 ('sectionLoadUrl' error)

You should use define in your jquery.cartAjax.js file instead of require, also pass $ as an argument so you can use it in the ajax call, require is specifically designed for phtml files and define for ...
Pascal Wientjes's user avatar
4 votes
Accepted

Change behavior of modules <depends> node - any downsides?

In magento 1 the point of the dependency is to tell one module that it cannot function without an other. You should not toy with the way the dependencies are checked. The fact that it works may mean ...
Marius's user avatar
  • 198k
4 votes
Accepted

Check if all module dependencies are met

There's a command to show the dependencies not sure if it is exactly what you need but it can help: php bin/magento info:dependencies:show-modules for modules dependencies php bin/magento info:...
Raphael at Digital Pianism's user avatar
4 votes
Accepted

Circular dependency: Magento\Customer\Model\Session depends on Magento\Customer\Model\Url and vice versa

This should not happen. Make sure you have this in the di.xml of the customer module <type name="Magento\Customer\Model\Session"> <arguments> <argument name="configShare" ...
Marius's user avatar
  • 198k
4 votes
Accepted

Magento 2 Module Observer Sequence order and Sales Order Event

At first, question, you want to trigger Module A module observer then fire observer of Module B. Then below is my solution is of this case. Disable Module B using xml code. Then Create around ...
Amit Bera's user avatar
  • 77.6k
3 votes
Accepted

<depends/> node real purpose

<depends/> node does not exist/supports in Magento 2 module.xml files(looks like it present only in early version of Magento). Module dependencies declared in composer.json, not in module.xml. ...
KAndy's user avatar
  • 20.9k
3 votes

Magento2 - override 3rd party module layout file in custom theme

As per Magento documentation you need to put the layout file under "layout/override/base". Try this example ( tested on Magento ver. 2.3.5) <theme_dir>/Smile_ElasticsuiteCatalog/layout/...
Ahsan's user avatar
  • 187
2 votes

Magento2 - override 3rd party module layout file in custom theme

Please note that magento has 2 ways to customize layout. Extend layout http://devdocs.magento.com/guides/v2.0/frontend-dev-guide/layouts/layout-extend.html Override layout http://devdocs.magento.com/...
Nicholas Miller's user avatar
2 votes

Circular dependency: Magento\Customer\Model\Session depends on Magento\Customer\Model\Url and vice versa

If you use redis for caching, I just ran a redis-cli FLUSHALL and it fixed after that.
Erfan Ghezelbash's user avatar
2 votes
Accepted

Magento2 Dependent select fields filtering

After inspecting the default Country and region select I found the solution. The solution in my case was that I was not returning id_city in region collection. As in the above xml I mentioned <...
AbdulBasit's user avatar
2 votes
Accepted

Disable Magento RSS module - Magento 2

Yes, it is a Magento bug. I hope near feature release this dependency will be resolved. On a Magento meet, Director of Architecture at Magento Commerce Anton Kril, mention that they are aware of ...
Amit Bera's user avatar
  • 77.6k
2 votes
Accepted

Magento 1.9 Extend Model, Load It Before Parent

From what I understand, you want to rewrite a model so that Magento uses yours, instead of the original. If that's the case, there are some more steps involved. Here's an example of a basic module ...
Andrew Noble's user avatar
2 votes

Magento 2.2.4 : Different group dependency not working

The issue can be solved simply by mentioning the full path if the field is not in the current group. e.g. <depends> <field id="section/group/field">1</field> </depends> ...
PROGOSTECH's user avatar
2 votes
Accepted

Magento 2.2.4 : Different group dependency not working

It's only working if your field ID is under parent group ID. For apply dependency in other group, You need to add like this : <?xml version="1.0"?> <config xmlns:xsi="http://www.w3.org/2001/...
Rohan Hapani's user avatar
  • 17.5k
2 votes
Accepted

Dependecy error Magento 2 ('sectionLoadUrl' error)

Okay, I fixed it eventually, with help and thinking of Pascal Wientjes So, when discussing about what the issue could be with said person, we came to the conclusion that customer-data.js was loaded ...
Condor's user avatar
  • 647
2 votes

Magento 2 preference not working in di.xml

Using this blog post as a walk through on creating a preference: http://www.coolryan.com/magento/2016/01/22/preferences-in-magento-2/ I walked through the process of creating a preference for the ...
circlesix's user avatar
  • 4,323
1 vote
Accepted

Magento 2 : toggle whole group in system.xml based on field in another group

Kindly correct the close tag <field id="height" translate="label comment" type="text" sortOrder="150" showInDefault="1" showInWebsite="1" showInStore="1"> <label>Popup ...
Arunprabakaran M's user avatar
1 vote
Accepted

Magento 2 : Set dependency between two dropdown in ui form

You should have two dropdown in ui form like this : <field name="dropdown1"> <argument name="data" xsi:type="array"> <item name="options" xsi:type="object">VendorName\...
Rohan Hapani's user avatar
  • 17.5k
1 vote

Conditionally enable event observers in Magento 1.9

Try this In config.xml <controller_action_layout_generate_xml_before> <observers> <add_new_layout> <class>wsafreightcommon/observer</class> ...
Chirag Patel's user avatar
  • 6,166
1 vote

Ui-component form (Adding drop down field)in magento 2

Please check example https://github.com/Ximbo/magento2-dependent-fields This example uses attributes color and manufaturer (as defined in di.xml). Also it does not cover dataProvider usage and other ...
Mageinn's user avatar
  • 609
1 vote
Accepted

isModuleOutputEnabled | Resolving module conflict

Don't use isModuleOutputEnabled(). That can return true even if the module is disabled. It checks the value in core_config_data instead of checking if the module is loaded. Use isModuleEnabled() ...
Joe's user avatar
  • 466
1 vote

Magento 2 : Where Put External Dependency?

If your module has a composer.json, this probably means that you installed it via composer. In that case: you might want to reuse that module elsewhere you have to add the dependency to the module ...
Fabian Schmengler's user avatar
1 vote
Accepted

Error with Dependency Injection in widget

Check all of your namespaces, class names, file & folder names. This error can occurs when your namespace is like: Vendor\Module\Block\SomeName\AnotherName and your path to that file is like: ...
Siarhey Uchukhlebau's user avatar
1 vote

Is it recommended to use object manager by passing into constructor as a dependency?

This question is clearly a duplicate but it seems like you need some clarifications. If you do this: $objectManager = \Magento\Framework\App\ObjectManager::getInstance(); $product = $objectManager-&...
Raphael at Digital Pianism's user avatar
1 vote

Circular dependency: Magento\Customer\Model\Session depends on Magento\Customer\Model\Url and vice versa

There was an issue about is back on GitHub a while ago: https://github.com/magento/magento2/issues/762 Try to run the following to clear your cache and generation folders: rm -Rf /path/to/magento2/...
Raphael at Digital Pianism's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible