I have one module working fine on one Magento Instance(installation), but If I am installing the same module on another Magento instance on the same server, the view in front-end is not showing.
I have checked almost everything, but couldn't trace the issue.
The process I followed for installation on the second instance of Mangento is like:
php bin/magento module:enable module_name
php bin/magento setup:upgrade
php bin/magento cache:clean
error_reporting(E_ALL);// in app/bootstrap.php
ini_set('display_errors', 1); //in app/bootstrap.ph
Other points
- Cleaning static cache and all other cache in the back-end.
- The admin config for the module to enable the module is showing fine and it is enabled.
- The Magento Deploy mode is set to Developer
since the module is working on one instance and not working on another instance of Magento, I am scratching my head what else I may be missing.
Additional Info:
I have made some modification in the file
view/frontend/layout/catalog_product_view.xml
for example the original code was like:
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<referenceContainer name="content">
<block class="Myweb\MWAskquestion\Block\Catalog\Product\View\MWAskquestion"
name="askquestion" template="Myweb_MWAskquestion::mwaskquestion.phtml"></block>
</referenceContainer>
</body>
</page>
and the modified code is like:
<page layout="1column" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
<body>
<!-- /* <referenceContainer name="content"> */ -->
<referenceBlock name="product.info.options.wrapper.bottom">
<block class="Myweb\MWAskquestion\Block\Catalog\Product\View\MWAskquestion"
name="askquestion" template="Myweb_MWAskquestion::mwaskquestion.phtml"
after="product.info.addtocart"></block>
</referenceBlock>
</body>
</page>
Both instances of Magento hold the modified code. however if replace the modified code with the original code it works in second instance as well. but the output location of the html is on top of the page, whereas I want that below addtocart block.
but If I use the modified code in second instance of Magento, it doesn't work.