cancel
Showing results for 
Search instead for 
Did you mean: 

public_html/vendor/magento/framework/Data/Argument/Interpreter/Constant.php

public_html/vendor/magento/framework/Data/Argument/Interpreter/Constant.php

Hi, 

Warmth Greeting to everyone.

I am new in this platform and seeking for an assistance and guidance in this Forum. 

 

After a successful installation of extension. I tried to log in into our Magento 2 to clear the cache but unfortunately we cannot open our Website and Magento 2 anymore. 

 

Below command are showing up on our page.

[~/public_html]# php bin/magento module:status
Array
(
[name] => countryCodes
[value] => \Tabby\Checkout\Model\Method\Checkout::ALLOWED_COUNTRIES
)

 

/home/s________/public_html/vendor/magento/framework/Data/Argument/Interpreter/Constant.php

 

I would like to know also why we encounter this issue that turns out into not able to access our website and magento 2 admin.

 

 

Thanks, 

Dia

1 REPLY 1

Re: public_html/vendor/magento/framework/Data/Argument/Interpreter/Constant.php

Hello @shopeeme88bd4e 

 

Please try below steps:
Go to file path : vendor/magento/framework/Data/Argument/Interpreter/Constant.php

Change below code:

From:

public function evaluate(array $data) {
    if(!isset($data['value']) || !defined($data['value'])) {
        throw new \InvalidArgumentException('Constant name is expected.');
    }
    return constant($data['value']);
}

To this:

public function evaluate(array $data) {
    if(!isset($data['value']) || !defined($data['value'])) {
        print_r($data);exit;                                                    // <<<<<<<<<<<<
        throw new \InvalidArgumentException('Constant name is expected.');
    }
    return constant($data['value']);
}

It may help you!
Thank you.

Problem solved? Click Accept as Solution!