- Issue created by @catch
- π¬π§United Kingdom catch
Looking at this it's a lot more complicated than I outlined in the issue summary because the static render context stack is a final protection against container rebuilds in the middle of rendering etc.
What I think we can probably do is when rendering a placeholder within a Fiber, when the fiber is suspended, check if the render context stack changed, and if it did, then immediately resume the fiber to keep going - that should prevent cross-leakage of render context then. I don't have an implementation yet, but something along these lines.
- π¬π§United Kingdom catch
OK I did some investigation with π Try to replace path alias preloading with lazy generation Active and π Deprecate RendererInterface::render()'s sole $is_root_call parameter Needs work combined, and have a fix.
This is proper bug in core but because we don't actually have any runtime code that suspends fibers during rendering yet, it's not triggered by anything.
- πΊπΈUnited States smustgrave
This something we should add test coverage for?
- π¬π§United Kingdom catch
@smustgrave once you combine the three patches together we have a lot of implicit test coverage for it (as in core blows up without it).
I haven't got my head around how to add explicit test coverage yet, or indeed why the current fibers test coverage doesn't trigger the bug.
- π¬π§United Kingdom catch
@andypost without both fixes, any async code during rendering results in an exception, because we already protect against the escaping but didn't handle it everywhere when adding initial placeholder Fiber support.
- π«π·France andypost
@catch that's why I consider it task as async code was never supposed to be supported
The Needs Review Queue Bot β tested this issue. It fails the Drupal core commit checks. Therefore, this issue status is now "Needs work".
This does not mean that the patch necessarily needs to be re-rolled or the MR rebased. Read the Issue Summary, the issue tags and the latest discussion here to determine what needs to be done.
Consult the Drupal Contributor Guide β to find step-by-step guides for working with issues.