Problem/Motivation
As reported by @Crell on #2167039-70: Regression: page cache tags broken, also: some routes incorrectly use _controller -> No page object in template variables -> Fatal in seven_preprocess_page(), drupalRender() and drupalRenderCollectCacheTags() are in HtmlControllerBase, though they don't belong to.
Proposed resolution
Move them to own renderer or service to inject them to HTMLPageController.
Remaining tasks
Issue patch.
Test
User interface changes
N/A
API changes
N/A
Originally reported by Crell
| Comment | File | Size | Author |
|---|---|---|---|
| #10 | 2182149-10.patch | 2.99 KB | leon kessler |
| #8 | 2182149-8.patch | 679 bytes | edurenye |
| #8 | interdiff-2182149-5-8.txt | 596 bytes | edurenye |
| #5 | 2182149-5.patch | 603 bytes | edurenye |
Comments
Comment #1
dawehnerThis was certainly just a freakout from crell :)
If we manage to put drupal_render/drupal_render_collect_cache_tags into a service we will do it, otherwise the current pattern is the way to move forward.
Comment #2
wim leersClosing as per #1.
Comment #3
edurenye commentedThere is a reference to this issue in AjaxRenderer, at least we should remove that reference.
Comment #4
dawehner+1
Comment #5
edurenye commentedDone.
Should we replace the deprecated method too?
Comment #6
dawehnerI think the right fix is to actually convert drupal_render_root() to the renderer service.
Comment #7
wim leersFor #6.
Comment #8
edurenye commentedFixed.
Comment #9
wim leersThanks, this is a good step forward!
It's not quite done yet though: we want to have the
'@renderer'service injected into this service (so that it is passed into this class' constructor). Then we can removedrupalRenderRoot()altogether, and just call$this->renderer->renderRoot()!Comment #10
leon kessler commentedHere's a patch that injects the renderer service, and also removes the
drupalRenderRoot()method.Comment #12
dawehnerIs there a reason we cannot close this issue as duplicate of #2818677: Replace usages of deprecated method drupal_render_root()?
Comment #15
berdir> Is there a reason we cannot close this issue as duplicate of #2818677: Replace usages of deprecated method drupal_render_root()?
No reason.