Search code examples
phpsymfonyprestashopadminprestashop-1.7

PRESTASHOP - Return value of PrestaShop\Module\Ps_metrics\Helper\PrestaShopHelper::getTokenFromAdminLink() must be of the type string, null returned


I'm using prestashop and I have the following problem.

[Type error: Return value of PrestaShop\Module\Ps_metrics\Helper\PrestaShopHelper::getTokenFromAdminLink() must be of the type string, null returned] (https://i.sstatic.net/9SPhj.png)

After logging into my superadmin account i have this error. I can log into other employees' accounts without problems and everything works. However, when I log into the superadmin account, i.e. the main account, it shows me this problem.

PrestaShop version -> 1.7.7.4

PHP version -> I had 7.4 and everything worked, but when I got this error, I tried to reinstall to 7.2, but the change didn't help.


Solution

  • This is an error triggered by ps_metrics module, it's known for similar bugs, so check if there's an update available.

    If not, try resetting it (or completely uninstall if you are not using it).