简体   繁体   中英

Regarding admin panel of website error 500 and script error / symfony error

I had my website hosted on a2hosting and operating ecommerce website with platform prestashop. How while performing regular task of clear cache from performance tab under administration section of admin panel. Suddenly my admin panel is not accessible. My hosting provider gave following remark However, as a courtesy, we have taken a look and can see that the site www.asiauvsaa.com/asiauvsaa-prestashop has a script error.

[message] => Uncaught Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException: You have requested a non-existent parameter "mailer_user". in /home/asiauvsa/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:102

You will need to resolve that to correct the 500. In regards to the main URL. That issue appears to be due to a misconfigured .htaccess file. It then tries to resolve to https://www.asiauvsaa.com/en/ which doesn't exist.

not been able identify and rectify the error so i can have access to my admin panel.

Regards Minesh Shah

message] => Uncaught Symfony\\Component\\DependencyInjection\\Exception\\ParameterNotFoundException: You have requested a non-existent parameter "mailer_user". in /home/asiauvsa/public_html/vendor/symfony/symfony/src/Symfony/Component/DependencyInjection/ParameterBag/ParameterBag.php:102

This error usually occurs when you didnt defined the mailer_user parameter in parameter.yml file . Bcz Swift Mailer uses this parameter to configure emails. Just add this param in parameter.yml file and clear cache again . Hopefully this will resolve the issue.

You have %mailer_user% somewhere into configuration of your project, but you didn't have provided value for this parameter.

You basically have 3 ways to provide it:

  1. Simplest way is to add value for this parameter into parameters section of your services.yaml

  2. If this parameter is defined into your own configuration file - you can change it to %env(MAILER_USER)% and define value of MAILER_USER as environment variable (either natural environment variable or by using .env.local file)

  3. Hardest, but still possible way is to create CompilerPass to provide value of this parameter into DI container.

Please check Symfony documentation about configuration in a case if you need more information

UPDATE: Answer given above refers to Symfony 4, for Symfony 2 and 3 you have to provide value of your parameter through parameters.yml file.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM