A very large amount of the time when creating a style plugin that is a child of another style plugin, you will want to use the same theme function.
However, when you declare 'theme' => 'name' in the hook_views_plugins, it unconditionally tries to register that theme function as though you own it. This can mess up that theme function's definition completely. We need a way to prevent this from happening. The easiest way is probably a flag, but there might also be something we can do with tracing the parent trees. Since the most common occurence is on parentage, we can test any and all parent plugins and if they're using the same theme function, don't register it.
We can also test to see if a theme function is already registered as well, but that could lead to ordering issues where the correct one is actually registered last.
This bug goes all the way back to Views 2.x
| Comment | File | Size | Author |
|---|---|---|---|
| #3 | 1205376-register.patch | 587 bytes | dawehner |
| #2 | 1205376-register.patch | 554 bytes | dawehner |
Comments
Comment #1
dwwYeah, this nailed me over at #1170264: Add a views row style plugin to render panelizer nodes. For now, the workaround Earl suggested (which is working) is to do this in the plugin's init() method:
Comment #2
dawehnerHere is a patch.
Comment #3
dawehnerWith a slighly better name
Comment #4
dawehnerCommited to 7.x-3.x