Right now the code in view::render() uses the following invocation order for pre_render:
* exposed_form::pre_render
* style_plugin::pre_render
* hook_views_pre_render
* theme_views_pre_render
* field::pre_render

In order to simplify Views Bulk Operations and other add-ons that rely on pre_render to do their work, it would really make life easier to have the hook_views_pre_render called last, and preferably the style_plugin::pre_render called after the fields. The idea is that some fields change their data during pre_render, and the style plugin needs to adjust itself to these changes.

Patch to follow.

Comments

infojunkie’s picture

StatusFileSize
new1.32 KB
merlinofchaos’s picture

Does this patch apply to 7.x as well? If so I'm not against this. We need to doublecheck to see if the order here has been documented and, if so, keep the documentation in sync. I don't think it actually has been, though.

infojunkie’s picture

The patch also applies to 7.x-3.x with offset 100 lines. I'll also check the documentation. Thanks!

infojunkie’s picture

Status: Active » Needs review

Couldn't find any explicit mention of the pre_render order in docs or code comments.

infojunkie’s picture

FYI, this patch also applies to 6.x-2.x. It would be really neat if it could be applied there too!

merlinofchaos’s picture

It will probably not be added to the 2.x branch unless there's a critical need.

infojunkie’s picture

Fair enough. I'm sure you're anxious to move everyone away from 2.x anyway!

thebuckst0p’s picture

Seeing as this apparently relates to #1077260: Unable to select rows for D6, this would be great to see committed.

dawehner’s picture

Status: Needs review » Fixed

Great this patch applied to both 6.x-3.x and 7.x-3.x so committed to both.

@infojunkie Thanks for writing this patch!

Status: Fixed » Closed (fixed)

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

kenorb’s picture

StatusFileSize
new37 KB

Thanks for fixing it.
But unfortunately I've this problem with 6.x-2.16
Exactly with VBO #1151310: Row selections are lost - Confirmation page shows "You selected the following 0 rows"
With patch it does work.