Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
At the moment there are magic helper methods on both ViewStorage and ViewExecutable
to be able to cross-use some variables.
Let us use at least in views itself always the right object.
Comment | File | Size | Author |
---|---|---|---|
#36 | views-1788266-36.patch | 145.15 KB | tim.plunkett |
#35 | views-1788266-35.patch | 134.37 KB | tim.plunkett |
#33 | views-1788266-33.patch | 115.48 KB | tim.plunkett |
#32 | views-1788266-32.patch | 160.02 KB | tim.plunkett |
#30 | views-1788266-30.patch | 158.27 KB | tim.plunkett |
Comments
Comment #1
dawehnerThis is definitive some work which is not finished.
Comment #2
tim.plunkettMore work
Comment #4
tim.plunkettDuh.
Comment #5
tim.plunkettComment #7
tim.plunkettOMG this issue is killing me.
Comment #9
tim.plunkettLeft in some dpm's
Comment #11
tim.plunkettMore fixes.
Comment #13
tim.plunkettMore stuff.
Comment #15
tim.plunkettMOAR
Comment #17
tim.plunkettOne of the tests was asserting that you could get to the properties no matter which object :D
Comment #19
tim.plunkettComment #21
tim.plunkettAll of the other tests pass locally for me, in the Simpletest UI and from run-tests.sh
Comment #23
dawehnerSure for this case we can assume that the display handlers are enabled, but i think if possible we should get the information from the display array.
Are we sure we want to do that? views_get_applicable_views is runned on cache clear and load all views, so it should be probably fast if possible, so what about using $view->storage->display ?
Comment #24
tim.plunkettI'm going to test out #23 in a minute, just want to see if this does anything for those fails.
Comment #26
tim.plunkettOkay, I decided to type hint more strongly to help catch these last couple errors.
Comment #28
tim.plunkettWhat a rat's nest of bugs!
Comment #30
tim.plunkettWhoops!
Comment #32
tim.plunkettOkay! I think this is it!
Comment #33
tim.plunkettI opened #1792454: Add type hinting to function signatures for $view for the type hinting parts of this. They helped me debug, but they didn't actually affect the issue.
Comment #34
tim.plunkettThis would be a pain to reroll, so assigning for a review/commit.
Comment #35
tim.plunkettAlso removed __call().
Comment #36
tim.plunkettLAST PATCH!
If for some reason this doesn't patch, go with #35 and this can be a follow-up, but it should pass.
Comment #37
dawehnerScanned the code pretty fast.
Comment #38
dawehnerSo committed and pushed.