Jump to content

prestashop Uncaught Exception: Variable "severity Message" does not exist


bmcarvalho

Recommended Posts

after update 1.7.7.2 i alway get email error message, when checkinh logs i have 2 errors everytime we log in

 

30664 xxxxxxx     (127)        Internal Server Error     002021-03-09 10:48

30663 xxxxxxx     (127)         Internal Server Error      002021-03-09 10:48

image.thumb.png.4bab117a8108cf1b9118f5c9742f2d58.png

Severity should be 1-5 and not 127

 

when debuging and trying to accces log agains i get the following error

Variable "severityMessage" does not exist.

 

CRITICAL10:59:44phpUncaught Exception: Variable "severityMessage" does not exist.

CRITICAL10:59:44requestUncaught PHP Exception Twig\Error\RuntimeError: "Variable "severityMessage" does not exist." at /home/osotaoda/public_html/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Columns/Content/severity_level.html.twig line 47

Hide context    Hide trace

[▼ "exception" => RuntimeError {#3428 ▶} ]

 

 

LOGS

 

2021-03-09 19:45:33] request.INFO: Matched route "admin_module_notification_count". {"route":"admin_module_notification_count","route_parameters":{"_controller":"PrestaShopBundle\\Controller\\Admin\\Improve\\Modules\\AlertsController::notificationsCountAction","_legacy_controller":"AdminModulesNotifications","_legacy_link":"AdminModulesNotifications:count","_route":"admin_module_notification_count"},"request_uri":"https://www.xxxxxxxxxx.pt/adminfolder/index.php/improve/modules/alerts/count?_token=nIndVuIfQffYv1_9eA0MiSY5JYM13A5WqWZT49lbDVo","method":"GET"} []
[2021-03-09 19:45:33] security.DEBUG: Read existing security token from the session. {"key":"_security_main","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} []
[2021-03-09 19:45:33] security.DEBUG: User was reloaded from a user provider. {"provider":"PrestaShopBundle\\Security\\Admin\\EmployeeProvider","username":"xxxxxxxxxxxx"} []
[2021-03-09 19:45:33] app.ERROR: Data from PrestaShop Addons is invalid, and cannot fallback on cache.  {"exception":"Client error response [url] https://api-addons.prestashop.com?format=json&iso_lang=pt&iso_code=PT&version=1.7.7.2&shop_url=http%3A%2F%2Fxxxxxxxxxxxxxxxxxxxx&method=listing&action=customer&username=xxxxxxxxx&password=xxxxxxxx [status code] 400 [reason phrase] Bad Request"} []
[2021-03-09 19:45:33] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []

 

 

 

[2021-03-09 12:44:57] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
[2021-03-09 12:44:58] doctrine.DEBUG: SELECT name FROM pshu_module WHERE active = 1 [] []
[2021-03-09 12:44:58] request.INFO: Matched route "_wdt". {"route":"_wdt","route_parameters":{"_controller":"web_profiler.controller.profiler:toolbarAction","token":"5cb2a5","_route":"_wdt"},"request_uri":"https://xxxxxxxxxxxx/adminfolder/index.php/_wdt/5cb2a5?_token=g-EjLmbA-GLH5nnQotvn0NCG_xvYuEppCnWDuDym27U","method":"GET"} []
[2021-03-09 12:44:58] php.INFO: User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Creating Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. at /home/xxxxxxx/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php:66)"} []
[2021-03-09 12:44:58] php.INFO: User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Csa\Bundle\GuzzleBundle\DataCollector\GuzzleCollector". {"exception":"[object] (ErrorException(code: 0): User Deprecated: Implementing \"Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface\" without the \"reset()\" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class \"Csa\\Bundle\\GuzzleBundle\\DataCollector\\GuzzleCollector\". at /home/xxxxxxxx/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php:215)"} []
[2021-03-09 12:44:58] doctrine.DEBUG: SELECT name FROM pshu_module WHERE active = 1 [] []
[2021-03-09 12:44:58] request.INFO: Matched route "admin_common_notifications". {"route":"admin_common_notifications","route_parameters":{"_controller":"PrestaShopBundle\\Controller\\Admin\\CommonController::notificationsAction","_legacy_controller":"AdminCommon","_legacy_link":"AdminCommon","_route":"admin_common_notifications"},"request_uri":"https://xxxxxxxxxx/adminfolder/index.php/common/notifications?_token=g-EjLmbA-GLH5nnQotvn0NCG_xvYuEppCnWDuDym27U&rand=1615293898797","method":"POST"} []
[2021-03-09 12:44:58] security.DEBUG: Read existing security token from the session. {"key":"_security_main","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} []
[2021-03-09 12:44:58] security.DEBUG: User was reloaded from a user provider. {"provider":"PrestaShopBundle\\Security\\Admin\\EmployeeProvider","username":"xxxxxxxxxxxxxxx"} []
[2021-03-09 12:44:58] php.INFO: User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Creating Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. at /home/osotaoda/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php:66)"} []
[2021-03-09 12:44:58] php.INFO: User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Csa\Bundle\GuzzleBundle\DataCollector\GuzzleCollector". {"exception":"[object] (ErrorException(code: 0): User Deprecated: Implementing \"Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface\" without the \"reset()\" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class \"Csa\\Bundle\\GuzzleBundle\\DataCollector\\GuzzleCollector\". at /home/xxxxxxxx/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php:215)"} []
[2021-03-09 12:44:58] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []
[2021-03-09 12:45:04] doctrine.DEBUG: SELECT name FROM pshu_module WHERE active = 1 [] []
[2021-03-09 12:45:04] request.INFO: Matched route "admin_performance_save". {"route":"admin_performance_save","route_parameters":{"_controller":"PrestaShopBundle\\Controller\\Admin\\Configure\\AdvancedParameters\\PerformanceController::processFormAction","_legacy_controller":"AdminPerformance","_legacy_link":"AdminPerformance:update","_route":"admin_performance_save"},"request_uri":"https://xxxxxxxx/adminfolder/index.php/configure/advanced/performance/?_token=g-EjLmbA-GLH5nnQotvn0NCG_xvYuEppCnWDuDym27U","method":"POST"} []
[2021-03-09 12:45:04] security.DEBUG: Read existing security token from the session. {"key":"_security_main","token_class":"Symfony\\Component\\Security\\Core\\Authentication\\Token\\UsernamePasswordToken"} []
[2021-03-09 12:45:04] security.DEBUG: User was reloaded from a user provider. {"provider":"PrestaShopBundle\\Security\\Admin\\EmployeeProvider","username":"xxxxxxxxxxxxxxx"} []
[2021-03-09 12:45:04] php.INFO: User Deprecated: Creating Doctrine\ORM\Mapping\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. {"exception":"[object] (ErrorException(code: 0): User Deprecated: Creating Doctrine\\ORM\\Mapping\\UnderscoreNamingStrategy without making it number aware is deprecated and will be removed in Doctrine ORM 3.0. at /home/osotaoda/public_html/vendor/doctrine/orm/lib/Doctrine/ORM/Mapping/UnderscoreNamingStrategy.php:66)"} []
[2021-03-09 12:45:04] doctrine.DEBUG: SELECT * FROM pshu_memcached_servers [] []
[2021-03-09 12:45:04] php.INFO: User Deprecated: Implementing "Symfony\Component\HttpKernel\DataCollector\DataCollectorInterface" without the "reset()" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class "Csa\Bundle\GuzzleBundle\DataCollector\GuzzleCollector". {"exception":"[object] (ErrorException(code: 0): User Deprecated: Implementing \"Symfony\\Component\\HttpKernel\\DataCollector\\DataCollectorInterface\" without the \"reset()\" method is deprecated since Symfony 3.4 and will be unsupported in 4.0 for class \"Csa\\Bundle\\GuzzleBundle\\DataCollector\\GuzzleCollector\". at /home/xxxxxx/public_html/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Profiler/Profiler.php:215)"} []
[2021-03-09 12:45:04] security.DEBUG: Stored the security token in the session. {"key":"_security_main"} []

 

 

Any ideas 

 

thank you

 

  • Like 1
Link to comment
Share on other sites

I've also have this problem. I don't know if it occurred when I'm logging in the backoffice. I think i get it randomly. I'm starting getting these message when I've configured the 'Mail Alert'- module. I've changed the list of the E-mail addresses.
 

My email message i receive in my email is like :
---------

Hallo {firstname} {lastname},

Nieuw alarm bericht opgeslagen

OPGELET: er is een nieuwe waarschuwing in het logboek van de backoffice.

U kan deze bekijken via Geavanceerde Paramaters > Logs in uw backoffice.

------------------
Customers can still doing online shopping and pay.

---------------------
Update : "Disable all overrides" was 'Yes', now is it 'No'.  (Turned off)

I don't if this helped. I will reply after 2 days of no getting log-warning message. Or I will reply if I still getting messages.

---------------------

Update 2: Didn't helped, still getting same message in my log and email

 

Screenshot_2021-03-14 Module Manager • Ken Treehouse.png

Edited by Shaw Kwok
Update (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 1 month later...
On 3/14/2021 at 5:46 AM, Shaw Kwok said:

I've also have this problem. I don't know if it occurred when I'm logging in the backoffice. I think i get it randomly. I'm starting getting these message when I've configured the 'Mail Alert'- module. I've changed the list of the E-mail addresses.
 

My email message i receive in my email is like :
---------

Hallo {firstname} {lastname},

Nieuw alarm bericht opgeslagen

OPGELET: er is een nieuwe waarschuwing in het logboek van de backoffice.

U kan deze bekijken via Geavanceerde Paramaters > Logs in uw backoffice.

------------------
Customers can still doing online shopping and pay.

---------------------
Update : "Disable all overrides" was 'Yes', now is it 'No'.  (Turned off)

I don't if this helped. I will reply after 2 days of no getting log-warning message. Or I will reply if I still getting messages.

---------------------

Update 2: Didn't helped, still getting same message in my log and email

 

Screenshot_2021-03-14 Module Manager • Ken Treehouse.png

I'm having exactly the same issue. Did you found a solution?

Regards.

 

Link to comment
Share on other sites

Prestashop 1.7.5.2 here.

Same problem.

Here's how it happened:

Everytime I logged in to Backoffice (1st page Dashboard) a log alert Internal Server Error was generated and I got the email about it. It happened everytime I refreshed the Dashboard page. So I figured out it must be the Prestashop Metrics module.

So I went on and disabled it. By doing that I lost access to Backoffice (just get a blank page, no errors whenever I try to enter Backoffice).

Then I enabled debug mode. Now I can access Backoffice but if I try to go to the server Logs it crashes with the OP error.

Cleared caches, uninstalled Prestashop Metrics, disable all dashboard modules, regenerated .htaccess files. Problems persists. And I have no access to Backoffice if I disable debug mode.

Now what???

 

Edit:
maybe these help?

CRITICAL 12:10:08phpUncaught Exception: Variable "severityMessage" does not exist.

CRITICAL 12:10:08requestUncaught PHP Exception Twig\Error\RuntimeError: "Variable "severityMessage" does not exist." at /var/www/vhosts/panacea3.gr/httpdocs/eshop/src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Columns/Content/severity_level.html.twig line 47

Edited by Dilton
Addition of error message (see edit history)
Link to comment
Share on other sites

I have the same problem in PS 1.7.6.9 for few days, no changes have been made on Prestashop but it is constantly sending mails with log information. First I got (127) Unauthorized messages and then (127) Internal Server Error.

This happens when I am on the PS dashboard, I tried to deactivate the PS_Metrics module which was activated on this page and it seems that PS does not produce any more errors ...

They have certainly changed something in the way PS_Metrics works through their API ...

(I had tried to deactivate the mails but this option in the back office to deactivate the log mails does not seem to work for this type of errors.)

Edited by Pierre1 (see edit history)
Link to comment
Share on other sites

The following modification solved the error about SeverityMessage not defined when displaying logs in debug mode.

This doesn't resolve the root cause of the issue which is the creation of the log when displaying the Dashboard.

1- Open file  src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Columns/Content/severity_level.html.twig

2- Search line #42   {% set severityClass = '' %}

3- Add after   {% set severityMessage = '' %}

Source :

https://build.prestashop.com/news/coreweekly-14-2021/   check #23856 that redirects to github

https://github.com/PrestaShop/PrestaShop/pull/23856

Edited by renatototo (see edit history)
  • Like 1
Link to comment
Share on other sites

  • 2 weeks later...
On 4/20/2021 at 12:42 PM, renatototo said:

The following modification solved the error about SeverityMessage not defined when displaying logs in debug mode.

This doesn't resolve the root cause of the issue which is the creation of the log when displaying the Dashboard.

1- Open file  src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Columns/Content/severity_level.html.twig

2- Search line #42   {% set severityClass = '' %}

3- Add after   {% set severityMessage = '' %}

Source :

https://build.prestashop.com/news/coreweekly-14-2021/   check #23856 that redirects to github

https://github.com/PrestaShop/PrestaShop/pull/23856

thanks. I did what you suggested and i have no more errors in LOGS....but i cannot access BO (error 500). It allows me to enter BO only on DEBUG "ON" that i have to turn it on or off via ftp.

Do you know what could it be? and how i could solve the problem?

Regards

Fabrizio

Link to comment
Share on other sites

  • 8 months later...

Hello,
I had this error today and I used the solution of adding the line :
{% set severityMessage = '' %} 
in the :
src/PrestaShopBundle/Resources/views/Admin/Common/Grid/Columns/Content/severity_level.html.twig

To solve my problem I had to add this line at the beginning of the file before using this variable:
{% if severity == 1 %}

Thank you for all your messages on this support page.

Link to comment
Share on other sites

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...