| Project: | Internationalization Views |
| Version: | 7.x-3.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | major |
| Assigned: | Unassigned |
| Status: | reviewed & tested by the community |
Issue Summary
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.
Comments
#1
Same error installing the module on a site with some views already created (and exported to code btw). Patch attached.
#2
Patch in #1 works. Thank you.
#3
Applied it, it works.
If there's a better pattern to guarantee that
$display->handlerhas the desired method, it'd be nice to do that instead, but I don't know enough about the internals.#4
Works for me also