php - Laravel 重置密码电子邮件不适用于生产
问题描述
当我尝试忘记密码并在我的 laravel 应用程序中输入我的电子邮件时收到此错误:
传递给 DOMNode::removeChild() 的参数 1 必须是 DOMNode 的实例,给定 null
我今天早些时候发布了这个问题,但没有得到任何回应。(请阅读问题和评论。)所以我正在为问题添加更多细节,因为旧问题现在可能不会引起太多关注,所以我要问一个新问题。
我开始跟踪请求并转储变量以查看生产机器和本地机器之间的差异在哪里。(顺便说一句,生产服务器和本地服务器现在都具有相同的 php 版本。)
里面有这个功能
供应商/laravel/framework/src/Illuminate/Mail/Markdown.php
/**
* Render the Markdown template into HTML.
*
* @param string $view
* @param array $data
* @param \TijsVerkoyen\CssToInlineStyles\CssToInlineStyles|null $inliner
* @return \Illuminate\Support\HtmlString
*/
public function render($view, array $data = [], $inliner = null)
{
$this->view->flushFinderCache();
$contents = $this->view->replaceNamespace(
'mail', $this->htmlComponentPaths()
)->make($view, $data)->render();
return new HtmlString(($inliner ?: new CssToInlineStyles)->convert(
$contents, $this->view->make('mail::themes.'.$this->theme)->render()
));
}
我转储了变量$view
,并$data
在生产和本地都给出了相同的值:
变量视图:"notifications::email"
和
可变数据:
array:8 [▼
"level" => "info"
"subject" => null
"greeting" => null
"salutation" => null
"introLines" => array:1 [▶]
"outroLines" => array:1 [▶]
"actionText" => "Change Password"
"actionUrl" => "http://localhost:8000/password/reset/ff6f1edf6793bf4fadf462781e5258980ddd3c94e545b3b9744b279842f75d93"
]
但是当我转储$contents
变量时,在这个代码段之后:
$contents = $this->view->replaceNamespace(
'mail', $this->htmlComponentPaths()
)->make($view, $data)->render();
结果在我的服务器中为空,而在我的本地机器中,它转储了电子邮件的 html,这就是我想要的。
有人看到这里的问题吗?
解决方案
推荐阅读
- c++ - 如何让 B 样条曲线连接到最终控制点?
- c# - 从 case (c#) 错误调用方法 - 参数:无法将 float 传输到 int
- editor - Sublime Text 3 右键单击上下文菜单缺少许多选项
- linux - 删除多个文本文件中的重复行(循环)
- c# - selenium IWebElement 的部分属性和方法不适用于 geckodriver
- git - 如何执行不包括某些文件类型的 git diff?
- javascript - Javascript没有改变src属性?
- python - 激光雷达数据图
- python - 让 fibo 更快
- c - 什么 C 构造可以让我“反向引用”一个数组?