2

I have create custom error template into pub\errors\custom folder and Customize 503.phtml template file and write custom message into it.

In Site Default Mode and Production Mode Template File Working Well except developer mode.

So, can anyone tell me how to call my custom template file message in developer mode.

Thanks in advance...!

0

The decision to show a 503 page is done in \Magento\Framework\App\Http::catchException, specifically in method handleBootstrapErrors.

public function catchException(Bootstrap $bootstrap, \Exception $exception)
    {
        $result = $this->handleDeveloperMode($bootstrap, $exception)
            || $this->handleBootstrapErrors($bootstrap, $exception)
            || $this->handleSessionException($exception)
            || $this->handleInitException($exception)
            || $this->handleGenericReport($bootstrap, $exception);
        return $result;
    }

But if developer mode is enabled then handleDeveloperMode returs true so the others don't get executed.

If you just need to work on / design the 503 page then you can just add return false; at the beginning of handleDeveloperMode

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.