Question

I manage my Magento modules with modman which requires symlinks in Magento to be enabled.

After upgrading to Magento CE 1.9.3.4 I see the following message when I log into admin

Symlinks are enabled. This may expose security risks. We strongly recommend to disable them.

I accept the risks associated with symlinks being enabled and would like to remove the admin message as it may cause confusion for other admin users.

What is the best way to remove the symlinks enabled warning?

Was it helpful?

Solution

As a explained in my blog post, the corresponding template is located in:

app/design/adminhtml/default/default/template/notification/symlink.phtml

This means that the best way to remove it is either:

  1. create a new adminhtml theme and add an empty symlink.phtml file.

  2. Alternatively, place a layout update in a module that removes the notification_symlink block from the admin.

So, in a module of choice, add the following to config.xml:

<config>
    <adminhtml>
        <layout>
            <updates>
                <mymodule>
                    <file>mymodule.xml</file>
                </mymodule>
            </updates>
        </layout>
    </adminhtml>
</config>

Then, create a file with content:

<layout>
    <default>
        <reference name="notifications">
            <remove name="notification_symlink"/>
        </reference>
    </default>
</layout>

Store it in app/design/adminhtml/default/default/layout/mymodule.xml. (or symlink it 😋)

OTHER TIPS

You can create a local.xml file in app/design/adminhtml/default/default/layout/

and add this code:

<layout>
    <default>
        <reference name="notifications">
            <remove name="notification_symlink"/>
        </reference>
    </default>
</layout>

Or in your custom admin theme...

Licensed under: CC-BY-SA with attribution
Not affiliated with magento.stackexchange
scroll top