Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,11 @@ Versioning](https://semver.org/spec/v2.0.0.html).

## [Unreleased]

## [1.5.3] - 2026-11-19

- [PR-412](https://github.com/itk-dev/os2loop/pull/412)
- Fixed bug in toc

## [1.5.2] - 2026-11-18

- [PR-410](https://github.com/itk-dev/os2loop/pull/410)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Drupal\Core\Entity\EntityTypeManagerInterface;
use Drupal\Core\Form\FormStateInterface;
use Drupal\Core\Plugin\ContainerFactoryPluginInterface;
use Drupal\Core\Render\RenderContext;
use Drupal\Core\Render\RendererInterface;
use Drupal\Core\Routing\RouteMatchInterface;
use Drupal\node\NodeInterface;
Expand Down Expand Up @@ -180,8 +181,14 @@ public function build() {
$view_mode = 'full';
$node_view = $this->entityTypeManager->getViewBuilder('node')->view($node, $view_mode);

// Get the completely render node HTML.
$node_html = (string) $this->renderer->render($node_view);
// Get the completely render node HTML. The node (and the paragraph
// holding this block) is already being rendered, so render it in a
// separate render context. This runs in its own Fiber, which keeps
// core's entity recursive render protection from aborting the render.
$context = new RenderContext();
$node_html = (string) $this->renderer->executeInRenderContext($context, function () use ($node_view) {
return $this->renderer->render($node_view);
});

$toc = $this->helper->createToc($node_html);

Expand All @@ -191,7 +198,11 @@ public function build() {
$build = [
'toc' => $this->tocBuilder->buildToc($toc),
];
}

// Let the node's cacheability bubble to the block.
if (!$context->isEmpty()) {
$context->pop()->applyTo($build);
}

}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Hide the default Drupal login form … */
.user-login-form #drupal-login {
display: none;
display: none;
}

/* … unless it's explicitly targeted. */
.user-login-form #drupal-login:target {
display: block;
display: block;
}
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
margin-left: 0;
}

li > li {
li > ol > li {
margin-left: 1em;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ $icons-comment-types: (
"os2loop_post_comment": "\f383",
// https://icons.getbootstrap.com/icons/exclamation-square/ (to match sqare
// question icon).
"os2loop_question_answer": "\f50b"
"os2loop_question_answer": "\f50b",
);

// svg content from node_modules/bootstrap-icons/icons/search.svg.
Expand Down
Loading