Problem/Motivation

views_plugin_row_node_view::render() currently doesn't add a reference to the current view as e.g. views_plugin_row_node_view::render() / views_plugin_row_user_view::render( do.
This stops the views theme suggestions from working as those are only added when the view object is available. See views_preprocess_node()

Proposed resolution

Add the view as entity object property in views_plugin_row_node_view::render() before calling drupal_render().

Remaining tasks

Reviews needed.

User interface changes

None.

API changes

None.

Comments

a.milkovsky’s picture

Status: Needs review » Reviewed & tested by the community

Makes sense for me.

fago’s picture

Status: Reviewed & tested by the community » Needs work

I see.

This stops the views theme suggestions from working as those are only added when the view object is available.

This is a good reason for doing it, but this should be commented it in the code. Else this looks good.

das-peter’s picture

Status: Needs work » Reviewed & tested by the community
StatusFileSize
new756 bytes

Added comment. I'd say back to RTBC.

fago’s picture

Status: Reviewed & tested by the community » Fixed

Thanks, committed.

  • das-peter authored 4d76c5c on 7.x-1.x
    Issue #2340487 by das-peter: Views Row Plugin "Rendered entity" should...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.