【问题标题】:An error occurred while loading the web debug toolbar (404: not found)?加载 Web 调试工具栏时出错(404:未找到)?
【发布时间】:2017-11-16 18:44:51
【问题描述】:

您好,我正在使用 Symfony (Swiftmailer) 发送电子邮件,我遇到的问题是:

加载 Web 调试工具栏时出错(404:未找到) 是否要打开分析器?

Screenshot

电子邮件已成功发送,但问题是我无法呈现任何 *.html.twig。


我尝试了 != 命令 php bin/console debug:event-dispatcher 和 .htacces 之类的解决方案

<IfModule mod_rewrite.c>    
    RewriteEngine On
    RewriteBase /
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /app.php [L]
</IfModule>
<IfModule !mod_rewrite.c>
    <IfModule mod_alias.c>
        # When mod_rewrite is not available, we instruct a temporary redirect of
        # the start page to the front controller explicitly so that the website
        # and the generated links can still be used.
        RedirectMatch 302 ^/$ /app.php/
        # RedirectTemp cannot be used instead
    </IfModule>
</IfModule>

但是网上提出的所有解决方案都对我不起作用,感谢您的帮助。

【问题讨论】:

  • 检查防火墙和路由以获取调试工具栏。只有 Swiftmailer 有问题吗?
  • 是的,只有 swiftmailer 才有问题
  • 当我查看 config_dev.yml 时,我发现以下代码:web_profiler: toolbar: false intercept_redirects: false
  • 正在使用哪个版本的 symfony?

标签: php apache .htaccess symfony swiftmailer


【解决方案1】:

当我查看 config_dev.yml 时,我发现了以下代码:

web_profiler:
    toolbar: true
    intercept_redirects: false

我将工具栏的值设置为 false,它可以像

一样正常工作
web_profiler:
    toolbar: false
    intercept_redirects: false

此解决方案是否会触及其他文件并导致我出现其他问题?

【讨论】:

    猜你喜欢
    • 2014-01-30
    • 1970-01-01
    • 2018-09-30
    • 1970-01-01
    • 1970-01-01
    • 2015-02-24
    • 2014-03-25
    • 1970-01-01
    • 1970-01-01
    相关资源
    最近更新 更多