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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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 ...
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:...
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" ...
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 ...
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.
...
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/...
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/...
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.
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
<...
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 ...
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 ...
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>
...
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/...
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 ...
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 ...
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 ...
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\...
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>
...
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 ...
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() ...
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 ...
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:
...
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-&...
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/...
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
dependency × 87magento2 × 46
module × 15
magento-1.9 × 9
extensions × 8
event-observer × 7
composer × 7
magento2.3 × 5
dependency-injection × 5
magento-1 × 4
upgrade × 4
magento-1.7 × 3
php × 3
error × 3
adminform × 3
system.xml × 3
ui-form × 3
system-configuration × 3
component × 3
magento-2.1 × 2
javascript × 2
adminhtml × 2
overrides × 2
frontend × 2
uicomponent × 2