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

  1. Cleaning static cache and all other cache in the back-end.
  2. The admin config for the module to enable the module is showing fine and it is enabled.
  3. 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">
    <referenceContainer name="content">
    <block class="Myweb\MWAskquestion\Block\Catalog\Product\View\MWAskquestion" 
    name="askquestion" template="Myweb_MWAskquestion::mwaskquestion.phtml"></block>

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">
<!-- /* <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"  

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.

  • 1
    Both of your Magento instances have same configuration? Feb 16, 2018 at 2:29
  • devdocs.magento.com/guides/v2.2/frontend-dev-guide/layouts/… be mindful of the modes if one instance is developer while the other is in a production mode errors will be harder to identify. Also what does your block include (basic example is fine if sensitive data within)? And a specific Magento version helps 2.X?
    – B00MER
    Feb 16, 2018 at 6:05

1 Answer 1


Thanks to everyone who tried to help. I was able to identify the source of the problem.

Since I have modified the code as stated in the question:

<referenceBlock name="product.info.options.wrapper.bottom">

In the first instance where it is working the products do have additional options for buying, but in the second instance there were no options

As there are no options in the second instance the block, the block product.info.options.wrapper.bottom doesn't exist or is not generated by Magento, which ultimately causing my custom block not being displayed in the second instance.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.