Cachet: Line breaks not working in maintenance or incidents messages

Created on 15 Aug 2016  路  14Comments  路  Source: CachetHQ/Cachet

Before submitting your issue, please make sure that you've checked the checkboxes below.

  • [x ] I am running the latest release version of Cachet.
  • [x ] I am running at least PHP 5.5.9. _You can check this by running php -v._
  • [x ] I have ran rm -rf bootstrap/cache/*.

Expected behaviour

The line breaks (from the planned maintenance) are not correctly displayed on the main status page in the customer view and in the notification email.

The view in the admin panel looks as it should:

screen shot 2016-08-15 at 17 22 44

On the status page, the maintenance or incidents message doesn't contain any line breaks:

screen shot 2016-08-15 at 17 21 30

Actual behaviour

Line breaks are not correctly displayed in HTML.

Steps to reproduce

  1. Create a new incident or maintenance with line breaks
Bug Design

All 14 comments

This is correct behaviour, as the input field is Markdown. Markdown strips newlines. If you want to add a newline, add two spaces at the end of the previous line. It's one of the not so clean parts of Markdown.

@TheLastProject true, but it's annoying and misleading. Like HackerNews...

I've changed soft breaks to default to the expected behaviour.

Can definitely agree that breaking the Markdown standard here is acceptable, yeah.

Hi there

many thanks for your answers and your hint :)
We have added the two spaces, in the incident window it looks fine, but exactly the same content in the maintenance window looks like this:

screen shot 2016-08-15 at 17 36 54

Thanks!

I agree that this doesn't work in the maintenance screen so would seem to be a bug.

@williamsdb I think you need to bring this up with CommonMark.

Except that you use the same component on reporting an incident and recording maintenance and they give different results. That sounds more like a Cachet problem to me. Happy to provide more information but it is exactly as @giezi said in his post.

@joecohens reckon this could be a CSS thing?

If I'm not wrong, we are not using the markdown-body class on the schedules https://github.com/CachetHQ/Cachet/blob/2.3/resources/views/partials/schedule.blade.php#L8 I'm guessing that's the problem

This should now be fixed.

FYI had to remove the bootstrap cache for this to take effect.

Also, php artisan view:clear may have worked too?

Quite possibly yes but I just followed the upgrade instructions and when it didn't work force cleared the cache.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

GrahamCampbell picture GrahamCampbell  路  3Comments

sgutermann picture sgutermann  路  5Comments

Phelzier picture Phelzier  路  7Comments

doreplado picture doreplado  路  6Comments

saamo picture saamo  路  5Comments