Unify the placeholder HTML for better consistency and allow custom placeholder

Created on 18 March 2016, over 8 years ago
Updated 20 May 2024, about 1 month ago

Problem

I discovered this issue when I was trying to modify the placeholder HTML code.
When I changed the placeholder HTML in BigPipeStrategy.php, BigPipe stopped working.
After investigating into the problem, I found that there are two occurrence of basically the same string:

Line 168 in file BigPipeStrategy.php:

  return [
      '#markup' => '<div data-big-pipe-placeholder-id="' . Html::escape($big_pipe_placeholder_id) . '"></div>',

Line 419 in file BigPipe.php:

 $fragments = explode('<div data-big-pipe-placeholder-id="', $html);
    array_shift($fragments);
    $order = [];

    foreach ($fragments as $fragment) {
      $t = explode('"></div>', $fragment, 2);

Proposed solution

Replace those 2 occurrences with reference to the same string. I tried adding a new BigPipeConfig.php, but there should be more elegant ways to do so.

✨ Feature request
Status

Closed: duplicate

Version

8.2 ⚰️

Component
BigPipeΒ  β†’

Last updated about 13 hours ago

Created by

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

No activities found.

Production build 0.69.0 2024