Jump to content

[PrestaShop] Fatal error in module


ValterV

Recommended Posts

[PrestaShop] Fatal error in module file :/home/hg22ow4m/public_html/modules/ps_eventbus/ps_eventbus.php:
Class 'Symfony\Component\Dotenv\Dotenv' not found

My Prestashop is 1.6.1

How i fix that error ? I cant open modules page

Link to comment
Share on other sites

When i acess on modules page appears that message

[PrestaShop] Fatal error in module file :/home/hg22ow4m/public_html/modules/ps_eventbus/ps_eventbus.php:
syntax error, unexpected 'composer' (T_STRING), expecting function (T_FUNCTION)

Sorry im not a code guy, but im trying. I put that code on that:

 * @return void
     */
    private function loadEnv()
    {
        $dotEnv = new Symfony\Component\Dotenv\Dotenv();
        $dotEnv->load(_PS_MODULE_DIR_ . 'ps_eventbus/.env.dist');

        if (file_exists(_PS_MODULE_DIR_ . 'ps_eventbus/.env')) {
            $dotEnv->load(_PS_MODULE_DIR_ . 'ps_eventbus/.env');
        }
        composer update
    }

Link to comment
Share on other sites

So 

* @return void
     */
    private function loadEnv()
    {
        $dotEnv = new Symfony\Component\Dotenv\Dotenv();
        $dotEnv->load(_PS_MODULE_DIR_ . 'ps_eventbus/.env.dist');

        if (file_exists(_PS_MODULE_DIR_ . 'ps_eventbus/.env')) {
            $dotEnv->load(_PS_MODULE_DIR_ . 'ps_eventbus/.env');
        }
        $dotEnv-> composer update
    }

 

Its correct? Sorry im not a coder

Link to comment
Share on other sites

I found Prestashop error on

Unknown error na linha 422 do ficheiro /home/hg22ow4m/public_html/override/classes/Cart.php [2048] Declaration of Cart::checkQuantities() should be compatible with CartCore::checkQuantities($return_product = false)

or this is a problem because Ps event Bus?

Link to comment
Share on other sites

change the /home/hg22ow4m/public_html/override/classes/Cart.php [2048] Declaration of Cart::checkQuantities() to /home/hg22ow4m/public_html/override/classes/Cart.php [2048] Declaration of Cart::checkQuantities($return_product = false)

Link to comment
Share on other sites

  • 2 weeks later...

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...