When I try to regenerate the views string on the translate interface, I get this error when the batch op starts:
An AJAX HTTP error occurred. HTTP Result Code: 200 Debugging information follows. Path: /en/batch?render=overlay&id=270&op=do StatusText: OK ResponseText: Fatal error: Call to a member function unpack_translatables() on a non-object in /var/www//sites/all/modules/i18nviews/i18nviews.inc on line 20
I made a small patch, that resolves this for me:
in i18nviews.inc:
20c20,22
< $display->handler->unpack_translatables($translatables);
---
> if(is_object($display->handler)) {
> $display->handler->unpack_translatables($translatables);
> }
After inserting this if(), the the batch operation completes and the views strings can be transleted.
Comment | File | Size | Author |
---|---|---|---|
#1 | i18nviews-1653170.patch | 654 bytes | jonhattan |
Comments
Comment #1
jonhattanSame error installing the module on a site with some views already created (and exported to code btw). Patch attached.
Comment #2
Stan Turyn CreditAttribution: Stan Turyn commentedPatch in #1 works. Thank you.
Comment #3
wamilton CreditAttribution: wamilton commentedApplied it, it works.
If there's a better pattern to guarantee that
$display->handler
has the desired method, it'd be nice to do that instead, but I don't know enough about the internals.Comment #4
mErilainen CreditAttribution: mErilainen commentedWorks for me also
Comment #5
mvcworks for me!
Comment #6
Stijn Vanhandsaeme CreditAttribution: Stijn Vanhandsaeme commentedworks for me too. Thank you Jonhattan.
Comment #7
BrightBoldThis solved the problem for me as well. It would be nice if this could be committed, or, if the problem needs to be solved a different way, someone could recommend a direction for a better solution so this error can be eliminated.
Comment #8
HnLn CreditAttribution: HnLn commentedSame problem here. I only needed i18nviews to translate my exposed filters, the site already had a lot of translated views using core.
So I set the translation plugin to core after installing i18nviews, but I do use the (translated) filters.
Setting up and featuring was no problem, but when running install profile I got above error.
Patch in #1 fixes it for me.
Also had to patch views with https://drupal.org/comment/7356718#comment-7356718.
Comment #9
rolfmeijer CreditAttribution: rolfmeijer commentedYes, patch from #1 works for me too. Thank you.
Comment #10
webflo CreditAttribution: webflo commentedHmm i can not reproduce this issue. I followed the steps from #1. Looks like #1685144: Call to a member function init_display() on a non-object in modules/all/views/plugins/views_plugin_localization.inc is the proper fix for this issue?
Comment #11
saltednutI can reproduce the issue even with #1685144: Call to a member function init_display() on a non-object in modules/all/views/plugins/views_plugin_localization.inc applied to Views.
The patch from #1 fixes the issue for me.
Comment #12
Sutharsan CreditAttribution: Sutharsan commented@brantwynn, can you write down the steps to reproduce (with or without #1658144) so webflo can follow them and confirm the problem.
Comment #13
mkhamash CreditAttribution: mkhamash commentedRTBC patch #1, it seems that i18nviews will not be able to install in an installation profile without it, an example of an installation profile will not work without this patch is df [drupal-org.make].
Comment #14
AnybodyI can confirm this RTBC and would like to ask kindly for a new .dev and possibly stable release to make the module work again completely.
Thanks a lot for your hard work!
Comment #15
fuerst CreditAttribution: fuerst commentedConfirm patch in #1 works.
BTW: Views itself handles this problem the same way, see #1032836: Call to a member function unpack_translatables() on a non-object
Comment #16
AnybodyAfter 3 month: Is there an active maintainer who could have a look?
Comment #18
webflo CreditAttribution: webflo at UEBERBIT GmbH commentedComment #19
dqdwebflo++
jonhattan++
MS-Informatique++