Closed (fixed)
Project:
Drupal core
Version:
8.0.x-dev
Component:
views.module
Priority:
Major
Category:
Bug report
Assigned:
Unassigned
Issue tags:
Reporter:
Created:
2 Aug 2015 at 10:18 UTC
Updated:
10 Oct 2015 at 14:14 UTC
Jump to comment: Most recent, Most recent file


Comments
Comment #1
willzyx commentedThis happens even using bartik and I think that happens with any theme..
The problems seems to be in views + render cache; if you disable the render cache (using cache.backend.null) or you disable the views module, dropbutton.js is attached to the page and dropbuttons are displayed properly. Not totally sure but the problem seems to be how views renders fields in FieldPluginBase::advancedRender()
Comment #2
jcnventuraOn my tests, this only happenned on /admin/content
Comment #3
willzyx commentedalso /admin/people is affected. I think that every page generated by views in which there are dropbuttons is affected
Comment #4
lewisnymanhmm yeah the dropbuttons on the node creation page are still rendering so this could be a views issue.
Comment #5
willzyx commentedmoving to views.module component
Comment #6
olli commentedComment #7
dawehnerWe seriously need a test for that, but maybe more important, get a more sane architecture in place for things which are renderer maybe or maybe not inside a render context.
You should be able to write APIs which can be used outside of a render context, otherwise all your render related APIs will be bound in its usage to render API, not just internally,
and this is IMHO horrible on the longrun for maintainability.
Comment #8
wim leersThis regression was introduced by #2511472: Refactor all usages of drupal_render()/Renderer::render() that break #2450993. That, in turn, was a spin-off/child issue of #2450993, and at #2450993-33: Rendered Cache Metadata created during the main controller request gets lost, the change to
StylePluginBasethat causes this problem was introduced.The root cause:
StylePluginBaseneeds to be string-based.StylePluginBaseneeds to userender(), and notrenderPlain(). This used to be the case until #2511472: Refactor all usages of drupal_render()/Renderer::render() that break #2450993. (Clearly we're missing some test coverage there.)renderPlain()back torender(). This will bubble onto the main rendering context.render()will cause exceptions.RendererInterface::hasRenderContext()method. Which we can now handily exploit to use eitherrender()orrenderPlain().Yes, this is horrendous. But given the facts (Views' render pipeline was not updated in Drupal 8 to be render array-based, nor do render arrays support any format other than HTML, we have
hasRenderContext()because of deficiencies in the URL generation APIs), this seems like a fair compromise. Views is likely the only piece of code that needs to ever do this.Comment #9
wim leersAgreed that these are important goals. We won't achieve them in 8.0.0. We must achieve them in 9.0.0. We should starting to achieve them in 8.x.0.
Comment #10
gints.erglis commented#8 patch can be applied and fix issue
Comment #11
jcnventuraConflict between RTBC and 'Needs tests'
Comment #12
strykaizerWorking on a test
Comment #13
strykaizerTest only + test & patch added
Comment #16
jcnventuraNice test! I've also reviewed the patch, so I'm restoring it to RTBC.
Let's get this in asap. We shouldn't ship RC1 without this.
Comment #17
lauriiiJust added some docs because otherwise no one will remember why this test is being done.
Comment #18
alexpottCommitted decb9b1 and pushed to 8.0.x. Thanks!