Skip to main content
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Bumped by Community user
Explain more clearly that the output contains HTML
Source Link
AdamS
  • 817
  • 7
  • 17

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php (right after code adding HTML tags!). My, which outputs

Formats a string for HTML display by replacing variable placeholders.

My question is:

  1. Does anyone know a reason why the error page is text/plain given that it contains HTML.
  2. Shall I raise an issue and patch?

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php (right after code adding HTML tags!). My question is:

  1. Does anyone know a reason why the error page is text/plain.
  2. Shall I raise an issue and patch?

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php, which outputs

Formats a string for HTML display by replacing variable placeholders.

My question is:

  1. Does anyone know a reason why the error page is text/plain given that it contains HTML.
  2. Shall I raise an issue and patch?
Not the right place for drumming up patch review support
Source Link
Clive
  • 167.9k
  • 19
  • 303
  • 337

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php (right after code adding HTML tags!). My question is:

  1. Does anyone know a reason why the error page is text/plain.
  2. Shall I raise an issue and patch?
  3. And for extra credit: if I do, please will you review it and set RTBC?

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php (right after code adding HTML tags!). My question is:

  1. Does anyone know a reason why the error page is text/plain.
  2. Shall I raise an issue and patch?
  3. And for extra credit: if I do, please will you review it and set RTBC?

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php (right after code adding HTML tags!). My question is:

  1. Does anyone know a reason why the error page is text/plain.
  2. Shall I raise an issue and patch?
Source Link
AdamS
  • 817
  • 7
  • 17

Display "uncaught exception" page as content-type text/html

When there is an uncaught exception, Drupal 8 displays a simple dump of the exception.

I find that the page is served as 'Content-Type' = 'text/plain', yet it contains HTML: Error as plain text

It looks better to me when I change the code to serve as 'text/html': Error as HTML

I already found the code to change - it's in FinalExceptionSubscriber.php (right after code adding HTML tags!). My question is:

  1. Does anyone know a reason why the error page is text/plain.
  2. Shall I raise an issue and patch?
  3. And for extra credit: if I do, please will you review it and set RTBC?