2

I can't install any module in Magento 2 with the composer. Here are the steps I used to install:

Navigated to the root directory of my Magento 2 installation folder and follow these steps:

Install via packaging

composer require pagseguro/magento2

Executed

  1. php bin/magento setup:upgrade
    1. php bin/magento setup:static-content:deploy
    2. chmod 777 -R var/ pub/
    3. composer update pagseguro/magento2
    4. composer update pagseguro/pagseguro-php-sdk
    5. php bin/magento setup:upgrade
    6. php bin/magento setup:static-content:deploy

But when I navigated to STORES -> CONFIGURATION -> SALES -> PAYMENT METHODS

The module isn't exist.

I tried, but it's not working. My magento directory is: public_html/clubedental/loja ...

Again, I tried the execution pointed from public_html/clubedental/loja/bin/magento as below

  1. php public_html/clubedental/loja/bin/magento setup:upgrade

  2. php public_html/clubedental/loja/bin/magento setup:static-content:deploy

But still its not appearing.

  • Could you try clear cache in Magento Admin. – Iyappan Perumal Jul 2 '17 at 1:38
  • Unfortunately Nothing :/ – user56013 Jul 2 '17 at 2:41
1

If you have access to the DB of the site, take a look at the setup_module table to see if your module is showing up there. It should have the name and the current module version. If it's not showing up in that table, then your configuration files are incorrect. A module only requires two files to be registered:

app/code/{{vender_name}}/{{module_name}}/etc/module.xml

<?xml version="1.0"?>
<config xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="urn:magento:framework:Module/etc/module.xsd">
    <module name="{{vender_name}}_{{module_name}}" setup_version="0.0.1"/>
</config>

and

app/code/{{vender_name}}/{{module_name}}/registration.php

<?php
    \Magento\Framework\Component\ComponentRegistrar::register(
        \Magento\Framework\Component\ComponentRegistrar::MODULE,
        '{{vender_name}}_{{module_name}}',
        __DIR__
    );

If your module is registered correctly, then your next step is de-bugging the module's code. I would recommend looking at the layout xml files and the controller files that should be hitting, as this is the first step in any module's life cycle.

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.