dongshan8953 2019-08-12 11:07
浏览 134

Laravel重置密码电子邮件不适用于生产

I get this error when i try go to forgot password and enter my email in my laravel application :

Argument 1 passed to DOMNode::removeChild() must be an instance of DOMNode, null given

I posted this question earlier today but got no reponses. (Please read the question and the comments.) So i am adding more details to the question and because the older question might not get much attention now, i am asking a new one.

I started tracing the request and dumping the variables to see the where the difference is, between the production and the local machine. (By the way the production and local servers both have same php version now.)

There is this function in

vendor/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()
    ));
}

I dumped the variables $view and $data in both production and local, both giving the same values :

variable view : "notifications::email"

and

variable data :

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"
]

But when I dump the $contents variable, after this code segment :

$contents = $this->view->replaceNamespace(
    'mail', $this->htmlComponentPaths()
)->make($view, $data)->render();

the result is null in my server while in my local machine, it dumps a html of the email, which is what i want.

Does anybody see the issue here ?

  • 写回答

0条回答 默认 最新

    报告相同问题?

    悬赏问题

    • ¥15 求daily translation(DT)偏差订正方法的代码
    • ¥15 js调用html页面需要隐藏某个按钮
    • ¥15 ads仿真结果在圆图上是怎么读数的
    • ¥20 Cotex M3的调试和程序执行方式是什么样的?
    • ¥20 java项目连接sqlserver时报ssl相关错误
    • ¥15 一道python难题3
    • ¥15 牛顿斯科特系数表表示
    • ¥15 arduino 步进电机
    • ¥20 程序进入HardFault_Handler
    • ¥15 关于#python#的问题:自动化测试