If a display extender declares an option with the unpack_translatable callback, the callback does not get called. This is because views_object::unpack_translatable does not find the callback method on the display object (since this method is implemented on the display extender).

The solution is to override unpack_translatable on the views_plugin_display to loop over extenders. Patch to follow.

Members fund testing for the Drupal project. Drupal Association Learn more

Comments

dawehner’s picture

Interesting!

infojunkie’s picture

infojunkie’s picture

Status: Active » Needs review
dawehner’s picture

Given that we have to port this patch to Drupal 8 we need some kind of test and some point. Do you have the time to write one? Not sure though whether there exists one for display handlers in D7 already tbh.

infojunkie’s picture

We need this patch for the module Views Label Tooltip to work correctly in translation, and for any future field "extender" as described here: http://thereisamoduleforthat.com/content/recipe-extending-views-handlers...

I can write a test for D7 if that helps.

infojunkie’s picture

Added test to patch. Test fails when views_plugin_display is not patched.

infojunkie’s picture

Status: Needs review » Needs work
infojunkie’s picture

Status: Needs work » Needs review
berliner’s picture

Is there any reason why the test doesn't run?

berliner’s picture

berliner’s picture

stefan.r’s picture

reuploading the previous patch