I am trying to install a module Abcd_Core
using the command
sudo php bin/magento setup:upgrade
The output does list all the modules except Abcd_Core
. Also the app/etc/config.php
does not have Abcd_Core
in the array.
Here is what I did..
The module is located at <magento>/app/code/
The file
app/code/Abcd/Core/registration.php
has the code
\Magento\Framework\Component\ComponentRegistrar::register(
\Magento\Framework\Component\ComponentRegistrar::MODULE,
'Abcd_Core',
__DIR__
);
In app/code/Abcd/Core/etc
folder I have module.xml
, di.xml
files and a folder adminhtml
.
module.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="../../../../../lib/internal/Magento/Framework/Module/etc/module.xsd">
<module name="Abcd_Core" setup_version="1.0.0" />
</config>
di.xml
<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:ObjectManager/etc/config.xsd">
<preference for="Magento\Store\Model\Store" type="Abcd\Core\Model\Store" />
</config>
The app/code/Abcd/Core/etc/adminhtml
folder has routes.xml
and system.xml
.
There is a file app/code/Abcd/Core/Model/Store.php
which overrides the functionality of method getBaseUrl()
.
I tried cleaning the cache and then running the setup:upgrade several times, also tried
sudo php bin/magento module:enable Abcd_Core
but unable to install/enable the module.
Can anyone provide some input on what needs to be corrected?
FYI, I cloned the files from a git repository in my organization.
Thank you, Hari CL