Needs review
Project:
Views (for Drupal 7)
Version:
7.x-3.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
9 Oct 2012 at 14:58 UTC
Updated:
16 Feb 2020 at 22:30 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
dawehnerHere is a patch.
Comment #2
dawehnerbazinga
Comment #3
damiankloip commentedI think the logic in the render function needs to be changed too as $empty should be TRUE?
Comment #4
damiankloip commentedMoving back to views for testing.
Comment #6
dawehnerMh, this logik seems to be wrong for not-empty areas. You want to show them if !empty, see #1677784: $empty argument of the area handler render() is FALSE for the empty area. for more related data.
Comment #7
damiankloip commentedhmm, yeah I see what you mean. So the logic is pretty weird there really; we are relying on the actual $empty value to be FALSE for headers/footers and only the option being set to show actual empty text.
So atm, the empty text being rendered is dependent on this:
So this will never get set to TRUE, because the plugin_type will always be 'area' and not empty.
Comment #8
damiankloip commentedIf we change the conditional in init to check the handler_type and not the definition, I think it works as it should. I also added the same conditional that we are using in the render methods into the TestExample handler too, as the tests weren't picking up that this wasn't working before.
The logic is still quite confusing, we should review this and maybe base it more on the handler_type that gets passed in for areas instead?
Comment #9
damiankloip commentedComment #11
damiankloip commentedOk, new patch. Changed a few other things...
Comment #12
dawehnerYeah this could be the case if something is using views_get_handler directly.
I guess this should be backported ...
Comment #13
damiankloip commentedNot sure what else we need to include on the d7 port?
Comment #14
dawehnerMaybe also the isset, we never know
Comment #15
damiankloip commentedYeah, might as well.
Comment #16
damiankloip commentedComment #17
tim.plunkettSplitting them up just to be sure, will commit if it comes out as expected.
Comment #18
tim.plunkettCommitted!
http://drupalcode.org/project/views.git/commit/418cd1e
Comment #19
dawehner#1807624-13: Saving and rendering in empty region for 'Global: unfiltered' text does not work was marked as to be backported.
Comment #20
damiankloip commentedPatch in #15 is the D7 one.
Comment #21
dawehnerUps right
Comment #22
dawehnerRemove the VDC tag
Comment #23
damiankloip commentedLet's test the D7 version.
Comment #24
dawehnerCould we port the tests to d7 as well?
Comment #25
chris matthews commentedThe 6 year old patch at #23 to views_handler_area.inc and views_plugin_display.inc does not apply to the latest views 7.x-3.x-dev and if still applicable needs to be rerolled.
Comment #26
jigish.addweb commented@Chris Matthews, Please review this rerolled patch & share your feedback on the same.
Thanks!..
Comment #27
jigish.addweb commentedComment #28
damienmckennaComment #29
guypaddock commentedLooks like there's a typo in the
render_footer()method of #26 -- a double dollar-sign (i.e.$$empty).Attached is a revised patch that's the same as #26, but with the typo fixed.
Can we get this in? We need this for unfiltered text to work on a view that should only display a header when the view is not empty :)