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
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
11 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
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
7 votes
Accepted

How to make the fields of the fieldset multidependable?

If you check the code that is responsible for adding the corresponding fields in accordance with the dependencies in the file lib/web/mage/adminhtml/form.js, you will see the following scheme there: ...
Mageworx's user avatar
  • 3,796
6 votes
Accepted

Can the NPM fiasco happen to Magento 2?

It's not that bad. composer show -it shows a huge tree, but if you leave out the repositories hosted by Magento itself and the PHP extension requirements, the external requirements are: Composer ...
Fabian Schmengler's user avatar
5 votes
Accepted

Should addon of any extension use <depends> tag in addon registration file(package1_module2.xml)?

You should set as dependency just those modules that need some code and/or data/attributes created by other modules. So lets say that the module My_ModuleA declare a helper My_ModuleA_Helper_Data and ...
MauroNigrele's user avatar
  • 3,005
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

How to set priority for two custom module in magento

In your Assel_Sms.xml add <depends> <Custom_Guest /> </depends> This mean that your Assel_Sms module configuration will be loaded after the Custom_Guest configuration.
Alex Constantinescu's user avatar
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

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

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

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.5k
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.8k
3 votes

Magento 2 module still working after dependent module is getting disabled

In module.xml you can define only sequence of module loading, not dependencies of modules. Dependencies of modules are defined in composer.json. Hard in section require, soft in section suggest See ...
KAndy's user avatar
  • 20.8k
3 votes

Can the NPM fiasco happen to Magento 2?

it's definetely possible. If they are not already doing it, Magento could mirror all needed Packages on repo.magento.com. Although not sure what's the legal situation here
David Verholen's user avatar
2 votes

How to make the fields of the fieldset multidependable?

I may be wrong but unfortunately I don't think you can with the default Magento\Backend\Block\Widget\Form\Element\Dependence class. Let me explain: The addFieldDependence method looks like this: ...
Raphael at Digital Pianism's user avatar
2 votes

How to make the fields of the fieldset multidependable?

I think that you should look class Magento\Backend\Block\Widget\Form\Element\Dependence. You can create your own block inherited from this class and rewrite it how you want. In your code replaces ...
Eugene's user avatar
  • 111
2 votes

How to make the fields of the fieldset multidependable?

Create a di.xml under adminhtml and add following code: Basically need to overwrite Magento\Backend\Block\Widget\Form\Element\Dependence class <preference for="Magento\Backend\Block\Widget\...
Sohel Rana's user avatar
  • 35.8k
2 votes
Accepted

My three modules use same observer use but my third module should run same observer in last

To understand the module loading order which defines the order of observer execution, have a look at: https://magento.stackexchange.com/a/74862/243 You have the special case that your third module ...
Fabian Schmengler's user avatar
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,273
2 votes
Accepted

Magento 2 - Two dependencies in one field form?

Edit This seem to be an issue in Magento2, one possible workaround is In your construct inject FieldFactory and also create a protected var for _fieldFactory public function __construct( .........
MagePal Extensions'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

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
  • 161
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

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
  • 637
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.4k
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 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

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