- Issue created by @magicmyth
- 🇬🇧United Kingdom magicmyth
And here is a simple patch to resolve the issue.
ctools/plugins/content_types/node_context/node_author.inc
loads the user object ($user = user_load($node->uid)
) in ctools_node_author_content_type_render()
to pass to theme_username()
'account' parameter. However theme_username() will work just fine with a node object being passed as the value of 'account' (see template_preprocess_node()
which does exactly that).
Since Drupal 7 does not do a full user entity load when loading a node (user_node_load()
tries to add only what is commonly needed in as efficient way as possible), this might mean on sites that generate large teaser listings built with Panelizer that uses the Node author pane could be inefficiently doing a lot of user entity loading if many different authors are present on the page. Seeing as no one has ever complained about panelized teasers being dead slow (I certainly have not and have used them extensively) it probably won't change the world but may be a nice to have late in its lifetime optimisation for CTools 7 :)
Active
1.0
Code
And here is a simple patch to resolve the issue.