briggySmalls / skin-deep-server

Server for the skin deep magazine website
0 stars 1 forks source link

Phantom <br/>s #210

Closed briggySmalls closed 5 years ago

briggySmalls commented 5 years ago

It looks like upgrading Sage has introduced a slight bug for blocks that render using Laravel.

This is visible on the 'Events' page, which contains a block displaying event cards.

For some reason, around the <div class="event-details"> content <br/> elements get added by the browser. The actual content returned from the Blade renderer doesn't contain <br/> elements, but there are newlines where you might expect to see them (consistent with the template).

However, when the archive is displayed, and includes the same partial template (event-details.blade.php, the newlines are removed automatically.

This could be to do with the fact that the archive is created with sage('blade')->file(..) vs sage('blade')->make(...) . Or perhaps some other reason

briggySmalls commented 5 years ago

Attempted to use file system templating command by updating Widget.templateName to return a full filepath, however problem persists.

briggySmalls commented 5 years ago

Eliminating the @include directive in archive/event.blade.php (copy/pasting contents) has no effect.

briggySmalls commented 5 years ago

When used as a widget there are no issues.

The phantom <br>s only appear when used in an ACF block.

briggySmalls commented 5 years ago

The content has extra <p> and <br/> elements, which points to the wpautop function.

briggySmalls commented 5 years ago

See https://github.com/WordPress/gutenberg/issues/12530 for similar discussion

briggySmalls commented 5 years ago

Fixed in core https://core.trac.wordpress.org/changeset/45139