The problem is I have the vendor name capitalized, and then, don't know why the overrides don't work. Only when you want to change the template but still using default block. For example:

Override the catalog_product_view (single product page - the image)

Folders structure:

    │   registration.php
    │       module.xml
            │       catalog_product_view.xml




<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="GST_Override" setup_version="1.0.0"/>


<?xml version="1.0"?>
<page xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:View/Layout/etc/page_configuration.xsd">
        <referenceBlock name="product.info.media.image" template="GST_Override::product/view/gallery.phtml"/>


<p> test </p>

Expected result: No image shown and display 'test'

Actual result: Default magento view

What I've tried:

1) If I use remove attribute on layout:

<referenceBlock name="product.info.media.image" template="GST_Override::product/view/gallery.phtml" remove="true"/>

The image is removed.

2) If I use custom block on layout:

<referenceBlock class="GST\Override\Block\Product\View\Gallery" name="product.info.media.image" template="GST_Override::product/view/gallery.phtml" remove="true"/>

It works.

3) Definately, if I use a 'normal' vendor name like Test it works.

Is this a kind of bug? should I never use all capital leters to name vendor or module? Did I make a mistake? Can you reproduce this error or it's just me?


Capitalizing vendor name is not a problem. But for our own convenience we will be using first letter as capital.

  • Yep, but now I have made enough modules with this namespacing. And the thing is, I have some overrides like this that aren't working, I'd need to create another vendor or something else bc I cannot solve this. – slayerbleast Dec 13 '16 at 15:40

Looks like the problem not in module name and in module load sequence.

Try add to module.xml

        <module name="Magento_Catalog"/>
        <module name="Magento_ProductVideo"/>
  • Tried, doesn't work. – slayerbleast Dec 15 '16 at 10:24

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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