5

On my test server, every installed extensions are not listing in admin panel under Stores > Settings > Configuration > Advanced > Advanced.

And if the extension has configuration parameters vendorName/moduleName/etc/adminhtml/system.xml, module configuration tab is not visible under Stores > Settings > Configuration

Doing php bin/magento module:status the modules are listing and they are enabled.

Checking in the database (setup_module table) the modules are listing.

Checking in app/etc/config.xml the modules are listing and set to '1'.

On my local machine, all works fine so it must be a server issue (permissions ???).

I don't understand what is the problem.

  • Is your local environment in dev mode and production environment in production mode? How is your cache configured? – Phoenix128_RiccardoT Mar 23 '17 at 9:24
  • I thought they had same configuration but checking it I note you're right. So I changed mode on my test server: php bin/magento deploy:mode:set developer I tried again but nothing is changed. – WaPoNe Mar 23 '17 at 9:43
  • Seems like you missed something in your server. Are you sure you correctly copied all the files, you have correct permissions settiongs and you flushed your cache? – Phoenix128_RiccardoT Mar 23 '17 at 9:56
  • I'm facing same issue. Using composer require <modulename> works fine in Local. But it's not working on Server – Ankit Shah Mar 23 '17 at 9:56
  • I think is a file permissions issue. I have web server running with www-data user but I execute php bin/magento as another user and this setting requires me every time to give write permission to www-data user on var/ dir. How do you manage users on your production server? – WaPoNe Mar 23 '17 at 10:13
1

Whenever you add a configuration section for a module using a system.xml you need the corresponding ACL.

Example if you have a system.xml that looks like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:module:Magento_Config:etc/system_file.xsd">
    <system>
        <tab id="vendor" translate="label" sortOrder="300">
            <label>Vendor</label>
        </tab>
        <section id="module" translate="label" type="text" sortOrder="140" showInDefault="1" showInWebsite="1" showInStore="1">
            <tab>vendor</tab>
            ...
        </section>
    </system>
</config>

Then you will need an etc/acl.xml file that looks like this:

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Acl/etc/acl.xsd">
    <acl>
        <resources>
<resource id="Magento_Backend::system">
                    <resource id="Vendor_Module::vendor" title="Vendor" sortOrder="100">
                        <resource id="Vendor_Module::module" title="Module" sortOrder="100"/>
                    </resource>
                </resource>
            </resource>
        </resources>
    </acl>
</config>
  • I know that.. the extension has its etc/acl.xml file. The extension works fine installed on another machine – WaPoNe Mar 23 '17 at 9:27
  • @WaPoNe did you try to disable it and re enable it again from the CLI ? Is your admin user a superadmin or restricted user ? – Raphael at Digital Pianism Mar 23 '17 at 9:28
  • I tried just now.. nothing is changed. Is your admin user a superadmin or restricted user ? Are you talking about backend user? Superadmin? I'm using admin user, the first one created. – WaPoNe Mar 23 '17 at 9:39
  • yeah ok so it's what I call a superadmin. Hmmm that's annoying I'm out of ideas here – Raphael at Digital Pianism Mar 23 '17 at 9:40
  • Yeah.. it so very strange. I tried installing this extension, for example: composer require wapone/module-stickers. It works fine on my local machine but it doesn't work on test server. Could you try to install it? The only my idea is about file permissions.. – WaPoNe Mar 23 '17 at 9:46
0

The issue is due to directories/files permissions management, as I thought.

For my test server (in developer mode, just for now) I've followed this guide: https://magento.stackexchange.com/a/95033/10018 to set right permissions.

Then I've used setgid on var/ directory:

rm -rf var/*
chgrp www-data var/
chmod g+s var/

Now all works fine.

0

For posterity, PHP's OPCache can cause these symptoms as well. After you ensure permissions are sorted (see WaPoNe's answer), if the problem persists, flush OPCache and then Magento's cache.

To flush OPCache, restart PHP, or create a temporary script on your site and run it from the web:

<?php

$reset = opcache_reset();

echo $reset ? 'Flushed OPCache' : 'Failed';

cf. https://secure.php.net/manual/en/function.opcache-reset.php

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.