I'm using last i18nviews with translation Views selection in Views settings.
As explained here http://drupal.org/node/1002098#comment-3969148 i did a refresh on Views Strings in translate interface, but I get this error Call to a member function unpack_translatables() on a non-object in /home/XXXX.com/prod/sites/all/modules/views/plugins/views_plugin_localization.inc on line 139
I'm using the last dev of views from today.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

miro_dietiker’s picture

Try deactivating some modules and identify the broken plugin / handler.

We expect that one of your modules don't inherit correctly... Please check e.g. the class definitions for handlers and plugins.

You'll need to reproduce this issue on a fresh drupal install in order to make us able to work on this. Please provide us step by step instructions.

merlinofchaos’s picture

This functionality is really new, and I'm definitely interested in finding the (probable) bugs that are still in it. Unfortunately, from the looks of this one, this is going to take some effort to hunt down what is really wrong.

We need to determine why there's a non-object with unpack_translatables being called on it. The easiest way to do this will be is if a developer can reproduce the situation and then analyze the data that leads to it.

heyyo’s picture

I did a reinstall of views and i18nviews with devel modules, and everything is working now. so my install procedure with drush was buggy, I thought drush up views-6.x-3.x-dev was correct or drush dl views-6.x-3.x-dev, folllowed by drush updb.
So this bug is not related to any of my modules, but the update itself.

heyyo’s picture

what's the best to get a fresh install of views without losing views already created ?

merlinofchaos’s picture

Use the bulk exporter to export all your views into a module.

Once you've got that, you can then safely completely reinstall Views.

miro_dietiker’s picture

You might did some update that needed a views rebuild which was not triggered.
(Whatever version juggling you did during the setup)

drush cc isn't enough: Visit views tools tab and clear views cache.

Deprecated serialized data is really an ugly issue.

dawehner’s picture


drush cc isn't enough: Visit views tools tab and clear views cache.

Drush and views in the latest version has the feature "drush cc menu" <3

miro_dietiker’s picture

Status: Active » Closed (cannot reproduce)

We would be very interested in how to reproduce this issue, if it was not caused by a handling mistake.

heyyo’s picture

I have installed a debug environment with netbeans(quickstart project), but I'm really new to this kind of things, how could I track this bug, what do I need to check ?

Additionnal information Apache error.log

[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function unpack_translatables() on a non-object in /home/quickstart/websites/mydomain.com/sites/all/modules/views/plugins/views_plugin_localization.inc on line 139, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   1. {main}() /home/quickstart/websites/mydomain.com/index.php:0, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   2. menu_execute_active_handler() /home/quickstart/websites/mydomain.com/index.php:18, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   3. call_user_func_array() /home/quickstart/websites/mydomain.com/includes/menu.inc:348, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   4. i18nstrings_admin_refresh_page() /home/quickstart/websites/mydomain.com/includes/menu.inc:0, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   5. drupal_get_form() /home/quickstart/websites/mydomain.com/sites/all/modules/i18n/i18nstrings/i18nstrings.admin.inc:13, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   6. drupal_process_form() /home/quickstart/websites/mydomain.com/includes/form.inc:121, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   7. form_execute_handlers() /home/quickstart/websites/mydomain.com/includes/form.inc:422, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   8. i18nstrings_admin_refresh_submit() /home/quickstart/websites/mydomain.com/includes/form.inc:782, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP   9. i18nstrings_refresh_group() /home/quickstart/websites/mydomain.com/sites/all/modules/i18n/i18nstrings/i18nstrings.admin.inc:66, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP  10. call_user_func() /home/quickstart/websites/mydomain.com/sites/all/modules/i18n/i18nstrings/i18nstrings.module:964, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP  11. i18nviews_locale_refresh() /home/quickstart/websites/mydomain.com/sites/all/modules/i18n/i18nstrings/i18nstrings.module:0, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP  12. view->save_locale_strings() /home/quickstart/websites/mydomain.com/sites/all/modules/i18nviews/i18nviews.module:49, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP  13. view->process_locale_strings() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/view.inc:1660, referer: http://mydomain.com/admin/build/translate/refresh
[Tue Jan 25 12:48:04 2011] [error] [client 127.0.0.1] PHP  14. views_plugin_localization->process_locale_strings() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/view.inc:1685, referer: http://mydomain.com/admin/build/translate/refresh
heyyo’s picture

not sure if it's relevant but the views bulk export produces the same error.

[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP Fatal error:  Call to a member function unpack_translatables() on a non-object in /home/quickstart/websites/mydomain.com/sites/all/modules/views/plugins/views_plugin_localization.inc on line 139, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP Stack trace:, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   1. {main}() /home/quickstart/websites/mydomain.com/index.php:0, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   2. menu_execute_active_handler() /home/quickstart/websites/mydomain.com/index.php:18, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   3. call_user_func_array() /home/quickstart/websites/mydomain.com/includes/menu.inc:348, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   4. views_export_export() /home/quickstart/websites/mydomain.com/includes/menu.inc:0, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   5. drupal_build_form() /home/quickstart/websites/mydomain.com/sites/all/modules/views/views_export/views_export.module:71, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   6. _drupal_build_form() /home/quickstart/websites/mydomain.com/sites/all/modules/views/views.module:1257, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   7. drupal_process_form_new() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/form.inc:70, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   8. form_execute_handlers() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/form.inc:186, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP   9. views_export_export_form_submit() /home/quickstart/websites/mydomain.com/includes/form.inc:782, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  10. module_invoke() /home/quickstart/websites/mydomain.com/sites/all/modules/views/views_export/views_export.module:185, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  11. call_user_func_array() /home/quickstart/websites/mydomain.com/includes/module.inc:462, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  12. views_views_exportables() /home/quickstart/websites/mydomain.com/includes/module.inc:0, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  13. view->export() /home/quickstart/websites/mydomain.com/sites/all/modules/views/views.module:1431, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  14. view->export_locale_strings() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/view.inc:1483, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  15. view->process_locale_strings() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/view.inc:1674, referer: http://mydomain.com/admin/build/views/tools/export
[Tue Jan 25 13:03:01 2011] [error] [client 127.0.0.1] PHP  16. views_plugin_localization->process_locale_strings() /home/quickstart/websites/mydomain.com/sites/all/modules/views/includes/view.inc:1685, referer: http://mydomain.com/admin/build/views/tools/export
sgabe’s picture

I got this error when I tried to export a feature with a view provided by the Calendar module. When I uncheck this calendar view on the features export page, it works fine.

kenorb’s picture

Category: support » bug
Status: Closed (cannot reproduce) » Active

I've got this error, when clicking on 'Overridden' link on one of my Feature from Feature list.
On following URLs:
admin/build/features/geosearch_features
admin/build/features/geosearch_features/recreate

See the backtrace:



( ! ) Fatal error: Call to a member function unpack_translatables() on a non-object in /Volumes/Users HD/kenorb/Sites/coi/public_html/sites/all/modules/views/plugins/views_plugin_localization.inc on line 138
Call Stack
# Time Memory Function Location
1 0.0010 326900 {main}( ) ../index.php:0
2 0.3729 23948376 menu_execute_active_handler( $path = ??? ) ../index.php:18
3 0.3816 24872480 call_user_func_array
( 'drupal_get_form', array (0 => 'features_admin_components', 1 => class stdClass { public $filename = 'sites/all/modules/_custom/_features/geosearch_features/geosearch_features.module'; public $name = 'geosearch_features'; public $type = 'module'; public $status = '1'; public $throttle = '0'; public $schema_version = '0'; public $info = array ('core' => '6.x', 'dependencies' => array (0 => 'UKLP_UI', 1 => 'apachesolr_search', 2 => 'fe_block', 3 => 'flag', 4 => 'strongarm'), 'description' => 'Provides features for geosearch', 'features' => array ('ctools' => array (...), 'fe_block_settings' => array (...), 'flag' => array (...), 'variable' => array (...)), 'name' => 'Geosearch', 'package' => 'Features', 'project' => 'geosearch_features', 'version' => '6.x-1.21') }) )
../menu.inc:348
4 0.3817 24872700 drupal_get_form( $form_id = 'features_admin_components', class stdClass { public $filename = 'sites/all/modules/_custom/_features/geosearch_features/geosearch_features.module'; public $name = 'geosearch_features'; public $type = 'module'; public $status = '1'; public $throttle = '0'; public $schema_version = '0'; public $info = array ('core' => '6.x', 'dependencies' => array (0 => 'UKLP_UI', 1 => 'apachesolr_search', 2 => 'fe_block', 3 => 'flag', 4 => 'strongarm'), 'description' => 'Provides features for geosearch', 'features' => array ('ctools' => array (0 => 'strongarm:strongarm:1'), 'fe_block_settings' => array (0 => 'UKLP_UI-apachesolr_geofacet', 1 => 'UKLP_UI-apachesolr_geofilter', 2 => 'UKLP_UI-currentsearch', 3 => 'apachesolr_search-currentsearch'), 'flag' => array (0 => 'evaluate'), 'variable' => array (0 => 'ckan_importer_UKLP_UI_GEO_enabled', 1 => 'ckan_importer_UKLP_enabled')), 'name' => 'Geosearch', 'package' => 'Features', 'project' => 'geosearch_features', 'version' => '6.x-1.21') } ) ../menu.inc:0
5 0.3817 24873696 call_user_func_array
( 'drupal_retrieve_form', array (0 => 'features_admin_components', 1 => array ('storage' => NULL, 'submitted' => FALSE, 'post' => array ()), 2 => class stdClass { public $filename = 'sites/all/modules/_custom/_features/geosearch_features/geosearch_features.module'; public $name = 'geosearch_features'; public $type = 'module'; public $status = '1'; public $throttle = '0'; public $schema_version = '0'; public $info = array ('core' => '6.x', 'dependencies' => array (0 => 'UKLP_UI', 1 => 'apachesolr_search', 2 => 'fe_block', 3 => 'flag', 4 => 'strongarm'), 'description' => 'Provides features for geosearch', 'features' => array ('ctools' => array (...), 'fe_block_settings' => array (...), 'flag' => array (...), 'variable' => array (...)), 'name' => 'Geosearch', 'package' => 'Features', 'project' => 'geosearch_features', 'version' => '6.x-1.21') }) )
../form.inc:104
6 0.3817 24873964 drupal_retrieve_form( $form_id = 'features_admin_components', $form_state = array ('storage' => NULL, 'submitted' => FALSE, 'post' => array ()), class stdClass { public $filename = 'sites/all/modules/_custom/_features/geosearch_features/geosearch_features.module'; public $name = 'geosearch_features'; public $type = 'module'; public $status = '1'; public $throttle = '0'; public $schema_version = '0'; public $info = array ('core' => '6.x', 'dependencies' => array (0 => 'UKLP_UI', 1 => 'apachesolr_search', 2 => 'fe_block', 3 => 'flag', 4 => 'strongarm'), 'description' => 'Provides features for geosearch', 'features' => array ('ctools' => array (0 => 'strongarm:strongarm:1'), 'fe_block_settings' => array (0 => 'UKLP_UI-apachesolr_geofacet', 1 => 'UKLP_UI-apachesolr_geofilter', 2 => 'UKLP_UI-currentsearch', 3 => 'apachesolr_search-currentsearch'), 'flag' => array (0 => 'evaluate'), 'variable' => array (0 => 'ckan_importer_UKLP_UI_GEO_enabled', 1 => 'ckan_importer_UKLP_enabled')), 'name' => 'Geosearch', 'package' => 'Features', 'project' => 'geosearch_features', 'version' => '6.x-1.21') } ) ../form.inc:0
7 0.3818 24874872 call_user_func_array
( 'features_admin_components', array (0 => array ('storage' => NULL, 'submitted' => FALSE, 'post' => array ()), 1 => class stdClass { public $filename = 'sites/all/modules/_custom/_features/geosearch_features/geosearch_features.module'; public $name = 'geosearch_features'; public $type = 'module'; public $status = '1'; public $throttle = '0'; public $schema_version = '0'; public $info = array ('core' => '6.x', 'dependencies' => array (0 => 'UKLP_UI', 1 => 'apachesolr_search', 2 => 'fe_block', 3 => 'flag', 4 => 'strongarm'), 'description' => 'Provides features for geosearch', 'features' => array ('ctools' => array (...), 'fe_block_settings' => array (...), 'flag' => array (...), 'variable' => array (...)), 'name' => 'Geosearch', 'package' => 'Features', 'project' => 'geosearch_features', 'version' => '6.x-1.21') }) )
../form.inc:378
8 0.3818 24875092 features_admin_components( $form_state = array ('storage' => NULL, 'submitted' => FALSE, 'post' => array ()), $feature = class stdClass { public $filename = 'sites/all/modules/_custom/_features/geosearch_features/geosearch_features.module'; public $name = 'geosearch_features'; public $type = 'module'; public $status = '1'; public $throttle = '0'; public $schema_version = '0'; public $info = array ('core' => '6.x', 'dependencies' => array (0 => 'UKLP_UI', 1 => 'apachesolr_search', 2 => 'fe_block', 3 => 'flag', 4 => 'strongarm'), 'description' => 'Provides features for geosearch', 'features' => array ('ctools' => array (0 => 'strongarm:strongarm:1'), 'fe_block_settings' => array (0 => 'UKLP_UI-apachesolr_geofacet', 1 => 'UKLP_UI-apachesolr_geofilter', 2 => 'UKLP_UI-currentsearch', 3 => 'apachesolr_search-currentsearch'), 'flag' => array (0 => 'evaluate'), 'variable' => array (0 => 'ckan_importer_UKLP_UI_GEO_enabled', 1 => 'ckan_importer_UKLP_enabled')), 'name' => 'Geosearch', 'package' => 'Features', 'project' => 'geosearch_features', 'version' => '6.x-1.21') } ) ../form.inc:0
9 0.3836 25078636 features_get_component_states( $features = array (0 => 'geosearch_features'), $rebuild_only = FALSE, $reset = ??? ) ../features.admin.inc:488
10 0.7242 30941868 features_get_signature( $state = 'default', $module_name = 'geosearch_features', $component = 'views', $reset = FALSE ) ../features.export.inc:707
11 0.8104 37095692 features_var_export( $var = array (0 => class view { public $db_table = 'views_view'; public $base_table = 'node'; public $built = FALSE; public $executed = FALSE; public $editing = FALSE; public $args = array (); public $build_info = array (); public $use_ajax = FALSE; public $result = array (); public $current_page = NULL; public $items_per_page = NULL; public $offset = NULL; public $total_rows = NULL; public $attachment_before = ''; public $attachment_after = ''; public $exposed_data = array (); public $exposed_input = array (); public $old_view = array (); public $query = NULL; public $display_handler = class views_plugin_display_default { public $view = ...; public $handlers = array (); public $display = class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'default'; public $display_title = 'Defaults'; public $display_plugin = 'default'; public $position = 0; public $display_options = array (...); public $handler = ... }; public $options = array ('title' => 'Evaluate Datasets', 'enabled' => TRUE, 'display_comment' => '', 'css_class' => '', 'display_description' => '', 'use_ajax' => FALSE, 'hide_attachment_summary' => FALSE, 'items_per_page' => 10, 'offset' => 0, 'use_pager' => FALSE, 'use_more' => FALSE, 'use_more_always' => FALSE, 'use_more_text' => 'more', 'link_display' => '', 'group_by' => FALSE, 'access' => array (...), 'cache' => array (...), 'query' => array (...), 'exposed_form' => array (...), 'pager' => array (...), 'style_plugin' => 'bulk', 'style_options' => array (...), 'row_plugin' => 'fields', 'row_options' => array (...), 'exposed_block' => FALSE, 'header' => array (...), 'footer' => array (...), 'empty' => array (...), 'relationships' => array (...), 'fields' => array (...), 'sorts' => array (...), 'arguments' => array (...), 'filter_groups' => array (...), 'filters' => array (...)); public $definition = array ('title' => 'Defaults', 'help' => 'Default settings for this view.', 'handler' => 'views_plugin_display_default', 'theme' => 'views_view', 'no ui' => TRUE, 'no remove' => TRUE, 'js' => array (...), 'use ajax' => TRUE, 'use pager' => TRUE, 'use more' => TRUE, 'accept attachments' => TRUE, 'help topic' => 'display-default', 'module' => 'views', 'theme path' => 'sites/all/modules/views/theme', 'theme file' => 'theme.inc', 'path' => 'sites/all/modules/views/plugins', 'file' => 'views_plugin_display_default.inc', 'parent' => 'parent'); public $is_plugin = TRUE; public $plugin_type = 'display'; public $localization_keys = array (0 => 'default') }; public $style_plugin = NULL; public $vid = ''; public $name = 'wms_datasets'; public $description = ''; public $tag = ''; public $human_name = 'Web Mapping Service (WMS) Datasets'; public $core = 6; public $display = array ('default' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'default'; public $display_title = 'Defaults'; public $display_plugin = 'default'; public $position = 0; public $display_options = array (...); public $handler = class views_plugin_display_default { ... } }, 'openlayers_1' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'openlayers_1'; public $display_title = 'OpenLayers Data'; public $display_plugin = 'openlayers'; public $position = 0; public $display_options = array (...); public $handler = NULL }, 'block_1' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'block_1'; public $display_title = 'WMS block'; public $display_plugin = 'block'; public $position = 0; public $display_options = array (...); public $handler = class views_plugin_display_block { ... } }, 'page_1' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'page_1'; public $display_title = 'List'; public $display_plugin = 'page'; public $position = 0; public $display_options = array (...); public $handler = class views_plugin_display_page { ... } }, 'page_2' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'page_2'; public $display_title = 'Map'; public $display_plugin = 'page'; public $position = 0; public $display_options = array (...); public $handler = class views_plugin_display_page { ... } }); public $api_version = '3.0-alpha1'; public $disabled = FALSE; public $localization_plugin = class views_plugin_localization_core { public $export_strings = array (0 => 'Defaults', 1 => 'Evaluate Datasets', 2 => 'more', 3 => 'Apply', 4 => 'Reset', 5 => 'Sort By', 6 => 'Asc', 7 => 'Desc', 8 => 'Items per page', 9 => '- All -', 10 => 'Offset', 11 => 'flag', 12 => 'Dataset Name'); public $translate = TRUE; public $view = ...; public $display = NULL; public $options = array (); public $definition = array ('title' => 'Core', 'help' => 'Use Drupal core t() function. Not recommended, as it doesn\'t support updates to existing strings. If you need to translate Views labels into other languages, consider installing the <a href="http://drupal.org/project/i18n">Internationalization</a> package\'s Views translation module.', 'handler' => 'views_plugin_localization_core', 'help topic' => 'localization-core', 'module' => 'views', 'theme path' => 'sites/all/modules/views/theme', 'theme file' => 'theme.inc', 'path' => 'sites/all/modules/views/plugins', 'file' => 'views_plugin_localization_core.inc', 'parent' => 'parent'); public $is_plugin = TRUE; public $plugin_type = 'localization' }; public $current_display = 'default'; public $base_field = 'nid' }), $prefix = ???, $init = ??? ) ../features.export.inc:509
12 0.8104 37096088 features_var_export( $var = class view { public $db_table = 'views_view'; public $base_table = 'node'; public $built = FALSE; public $executed = FALSE; public $editing = FALSE; public $args = array (); public $build_info = array (); public $use_ajax = FALSE; public $result = array (); public $current_page = NULL; public $items_per_page = NULL; public $offset = NULL; public $total_rows = NULL; public $attachment_before = ''; public $attachment_after = ''; public $exposed_data = array (); public $exposed_input = array (); public $old_view = array (); public $query = NULL; public $display_handler = class views_plugin_display_default { public $view = ...; public $handlers = array (); public $display = class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'default'; public $display_title = 'Defaults'; public $display_plugin = 'default'; public $position = 0; public $display_options = array ('title' => 'Evaluate Datasets', 'access' => array (...), 'cache' => array (...), 'query' => array (...), 'exposed_form' => array (...), 'pager' => array (...), 'style_plugin' => 'bulk', 'style_options' => array (...), 'relationships' => array (...), 'fields' => array (...), 'filters' => array (...)); public $handler = ... }; public $options = array ('title' => 'Evaluate Datasets', 'enabled' => TRUE, 'display_comment' => '', 'css_class' => '', 'display_description' => '', 'use_ajax' => FALSE, 'hide_attachment_summary' => FALSE, 'items_per_page' => 10, 'offset' => 0, 'use_pager' => FALSE, 'use_more' => FALSE, 'use_more_always' => FALSE, 'use_more_text' => 'more', 'link_display' => '', 'group_by' => FALSE, 'access' => array ('type' => 'none'), 'cache' => array ('type' => 'none'), 'query' => array ('type' => 'views_query', 'options' => array (...)), 'exposed_form' => array ('type' => 'basic', 'options' => array (...)), 'pager' => array ('type' => 'full', 'options' => array (...)), 'style_plugin' => 'bulk', 'style_options' => array ('columns' => array (...), 'default' => '-1', 'info' => array (...), 'override' => 1, 'sticky' => 0, 'selected_operations' => array (...), 'execution_type' => '1', 'display_type' => '0', 'skip_confirmation' => 1, 'display_result' => 0, 'merge_single_action' => 1, 'hide_select_all' => 0, 'views_bulk_operations_fields_action' => array (...)), 'row_plugin' => 'fields', 'row_options' => array (), 'exposed_block' => FALSE, 'header' => array (), 'footer' => array (), 'empty' => array (), 'relationships' => array ('flag_content_rel' => array (...)), 'fields' => array ('title' => array (...)), 'sorts' => array (), 'arguments' => array (), 'filter_groups' => array ('operator' => 'AND', 'groups' => array (...)), 'filters' => array ('status_extra' => array (...), 'type' => array (...), 'flagged' => array (...))); public $definition = array ('title' => 'Defaults', 'help' => 'Default settings for this view.', 'handler' => 'views_plugin_display_default', 'theme' => 'views_view', 'no ui' => TRUE, 'no remove' => TRUE, 'js' => array (0 => 'misc/collapse.js', 1 => 'misc/textarea.js', 2 => 'misc/tabledrag.js', 3 => 'misc/autocomplete.js', 4 => 'sites/all/modules/views/js/dependent.js'), 'use ajax' => TRUE, 'use pager' => TRUE, 'use more' => TRUE, 'accept attachments' => TRUE, 'help topic' => 'display-default', 'module' => 'views', 'theme path' => 'sites/all/modules/views/theme', 'theme file' => 'theme.inc', 'path' => 'sites/all/modules/views/plugins', 'file' => 'views_plugin_display_default.inc', 'parent' => 'parent'); public $is_plugin = TRUE; public $plugin_type = 'display'; public $localization_keys = array (0 => 'default') }; public $style_plugin = NULL; public $vid = ''; public $name = 'wms_datasets'; public $description = ''; public $tag = ''; public $human_name = 'Web Mapping Service (WMS) Datasets'; public $core = 6; public $display = array ('default' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'default'; public $display_title = 'Defaults'; public $display_plugin = 'default'; public $position = 0; public $display_options = array ('title' => 'Evaluate Datasets', 'access' => array (...), 'cache' => array (...), 'query' => array (...), 'exposed_form' => array (...), 'pager' => array (...), 'style_plugin' => 'bulk', 'style_options' => array (...), 'relationships' => array (...), 'fields' => array (...), 'filters' => array (...)); public $handler = class views_plugin_display_default { public $view = ...; public $handlers = array (...); public $display = ...; public $options = array (...); public $definition = array (...); public $is_plugin = TRUE; public $plugin_type = 'display'; public $localization_keys = array (...) } }, 'openlayers_1' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'openlayers_1'; public $display_title = 'OpenLayers Data'; public $display_plugin = 'openlayers'; public $position = 0; public $display_options = array ('pager' => array (...), 'defaults' => array (...), 'style_plugin' => 'openlayers_data', 'style_options' => array (...)); public $handler = NULL }, 'block_1' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'block_1'; public $display_title = 'WMS block'; public $display_plugin = 'block'; public $position = 0; public $display_options = array ('display_description' => 'WMS Dataset block'); public $handler = class views_plugin_display_block { public $view = ...; public $handlers = array (...); public $display = ...; public $options = array (...); public $definition = array (...); public $is_plugin = TRUE; public $plugin_type = 'display'; public $localization_keys = array (...); public $default_display = class views_plugin_display_default { ... } } }, 'page_1' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'page_1'; public $display_title = 'List'; public $display_plugin = 'page'; public $position = 0; public $display_options = array ('path' => 'data/evaluate'); public $handler = class views_plugin_display_page { public $view = ...; public $handlers = array (...); public $display = ...; public $options = array (...); public $definition = array (...); public $is_plugin = TRUE; public $plugin_type = 'display'; public $localization_keys = array (...); public $default_display = class views_plugin_display_default { ... } } }, 'page_2' => class views_display { public $db_table = 'views_display'; public $vid = 0; public $id = 'page_2'; public $display_title = 'Map'; public $display_plugin = 'page'; public $position = 0; public $display_options = array ('defaults' => array (...), 'style_plugin' => 'openlayers_map', 'style_options' => array (...), 'path' => 'data/evaluate/map'); public $handler = class views_plugin_display_page { public $view = ...; public $handlers = array (...); public $display = ...; public $options = array (...); public $definition = array (...); public $is_plugin = TRUE; public $plugin_type = 'display'; public $localization_keys = array (...); public $default_display = class views_plugin_display_default { ... } } }); public $api_version = '3.0-alpha1'; public $disabled = FALSE; public $localization_plugin = class views_plugin_localization_core { public $export_strings = array (0 => 'Defaults', 1 => 'Evaluate Datasets', 2 => 'more', 3 => 'Apply', 4 => 'Reset', 5 => 'Sort By', 6 => 'Asc', 7 => 'Desc', 8 => 'Items per page', 9 => '- All -', 10 => 'Offset', 11 => 'flag', 12 => 'Dataset Name'); public $translate = TRUE; public $view = ...; public $display = NULL; public $options = array (); public $definition = array ('title' => 'Core', 'help' => 'Use Drupal core t() function. Not recommended, as it doesn\'t support updates to existing strings. If you need to translate Views labels into other languages, consider installing the <a href="http://drupal.org/project/i18n">Internationalization</a> package\'s Views translation module.', 'handler' => 'views_plugin_localization_core', 'help topic' => 'localization-core', 'module' => 'views', 'theme path' => 'sites/all/modules/views/theme', 'theme file' => 'theme.inc', 'path' => 'sites/all/modules/views/plugins', 'file' => 'views_plugin_localization_core.inc', 'parent' => 'parent'); public $is_plugin = TRUE; public $plugin_type = 'localization' }; public $current_display = 'default'; public $base_field = 'nid' }, $prefix = ' ', $init = FALSE ) ../features.export.inc:427
13 0.8104 37096088 view->export( $indent = ??? ) ../features.export.inc:418
14 0.8891 40293720 view->export_locale_strings( 'export' ) ../view.inc:1505
15 0.8891 40293764 view->process_locale_strings( $op = 'export' ) ../view.inc:1699
16 0.8892 40293764 views_plugin_localization->process_locale_strings( $op = 'export' ) ../view.inc:1710
Variables in local scope (#16)
$data =
 
array 
  'value' => string 'Dataset Name' (length=12) 
  'keys' => 
    array 
      0 => string 'wms_datasets' (length=12) 
      1 => string 'default' (length=7) 
      2 => string 'field' (length=5) 
      3 => string 'node' (length=4) 
      4 => string 'title' (length=5) 
      5 => string 'label' (length=5) 
$display =
 
object(views_display)[422]
  public 'db_table' => string 'views_display' (length=13) 
  public 'vid' => int 0 
  public 'id' => string 'openlayers_1' (length=12) 
  public 'display_title' => string 'OpenLayers Data' (length=15) 
  public 'display_plugin' => string 'openlayers' (length=10) 
  public 'position' => int 0 
  public 'display_options' => 
    array 
      'pager' => 
        array 
          'type' => string 'some' (length=4) 
      'defaults' => 
        array 
          'style_plugin' => boolean false 
          'style_options' => boolean false 
          'row_plugin' => boolean false 
          'row_options' => boolean false 
      'style_plugin' => string 'openlayers_data' (length=15) 
      'style_options' => 
        array 
          'data_source' => 
            array 
              'value' => string 'openlayers_wkt' (length=14) 
              'other_lat' => string 'title' (length=5) 
              'other_lon' => string 'title' (length=5) 
              'openlayers_wkt' => string 'title' (length=5) 
              'other_top' => string 'title' (length=5) 
              'other_right' => string 'title' (length=5) 
              'other_bottom' => string 'title' (length=5) 
              'other_left' => string 'title' (length=5) 
              'name_field' => string 'title' (length=5) 
              'description_field' => string '' (length=0) 
  public 'handler' => null 
$display_id =
string 'openlayers_1' (length=12) 
$op =
string 'export' (length=6) 
$translatable =
 
array 
  0 => 
    array 
      'value' => string 'OpenLayers Data' (length=15) 
      'keys' => 
        array 
          0 => string 'display_title' (length=13) 

alexiscott’s picture

I can confim this issue with calendar and views on Drupal 7 (Not using i18nviews)

I get it when I run drush fl, and it stops the display of my feauture list with:

Call to a member function get_option() on a non-object in /Users/alex/workspace/c4cm/modules/contrib-stable/views/plugins/views_plugin_style.inc on line 37

Note in the calendar view:

/* Display: Date browser */
$handler = $view->new_display('date_nav', 'Date browser', 'date_nav_1');

If I change 'date_nav' to 'block' there is no error and my feature list returns.

dawehner’s picture

Priority: Normal » Major

Views assumes in a lot of places that the display actually works. Here is another place on which the calendar display seems to be broken/not ported are whatever.

That's indeed something major

alexiscott’s picture

FileSize
771 bytes

Thanks for you're fast response Dereine. Here's a proposed patch to have views check to see if it's an object that get's returned, and ignore if not.

arcX

dawehner’s picture

Status: Active » Needs work
+++ plugins/views_plugin_localization.inc	(working copy)
@@ -135,7 +135,9 @@
+        $this->view->display[$display_id]->handler->unpack_translatables($translatable);

Translatable is always an array and never an object

Powered by Dreditor.

alexiscott’s picture

Ahhh, the error had led me to believe it was an object, and as it stopped the error I looked no further.

"Fatal error: Call to a member function unpack_translatables() on a non-object in /Volumes/Users"

So would is_array($translatable) be an option here?

arcX

alexiscott’s picture

Ahhh, the error had led me to believe it was an object, and as it stopped the error I looked no further.

"Fatal error: Call to a member function unpack_translatables() on a non-object in /Volumes/Users"

So would is_array($translatable) be an option here?

arcX

dawehner’s picture

In fact you should check $this->view->display[$display_id]->handler for is_object.

alexiscott’s picture

FileSize
800 bytes

Thanks: second attempt, but got a feeling it'll be third time lucky ;)

rbayliss’s picture

Confirming that #20 worked for me. I was having the features issue described in #12. I believe in my case the broken handler may have come from a filter on a missing taxonomy vocabulary that was provided by the feature.

shunting’s picture

Confirming that #20 works for me; I also had difficulties cloning Calendar. No features involved.

Views 6.x-3.x-dev
Calendar 6.x-2.4

Thanks!!

wiifm’s picture

Status: Needs work » Reviewed & tested by the community

Can also confirm that this patch does stop calendar from causing errors

old error (prior to patch):

seanh@ubuntu /var/www/mohbigbird git:master » drush features
PHP Fatal error:  Call to a member function unpack_translatables() on a non-object in /var/www/mohbigbird/sites/all/modules/contrib/views/plugins/views_plugin_localization.inc on line 142
Drush command terminated abnormally due to an unrecoverable error.                                                                                         [error]
Error: Call to a member function unpack_translatables() on a non-object in
/var/www/mohbigbird/sites/all/modules/contrib/views/plugins/views_plugin_localization.inc, line 142

Can this be committed?

manos_ws’s picture

Subscribe.

The patch in #20 works

Also this should get committed

Melissamcewen’s picture

#20 worked for me. THanks!

Jeremy’s picture

Solved it for me too.

mathieso’s picture

Aye, worked.

dawehner’s picture

So i'm wondering whether someone already managed to understand the issue?
There is probably a bug much deeper so there shouldn't be just this kind of easy fix as this might hide it.

betoscopio’s picture

As arcX posted in #13, i'm having a similar problem in the D7 version too. I've created an issue explaining my use case #1274236: Call to a member function unpack_translatables() on a non-object

dawehner’s picture

From my perspective this patch still lacks the understanding of the bug :(

Shawn DeArmond’s picture

Patch #20 also worked on 7.x-3.0-rc1.

In my situation, I was trying to re-export a Feature that had some Views.

dawehner’s picture

The real question behind the issue is, what should happen if a handler fails to initialize in $view->init_display().

There are several solutions

  • Ignore it and other code should handle this problem
  • The same as 1) but throw a vpr() at least
  • Unset $this->display[$id] if the display plugin itself failed.
shunting’s picture

And now the same error is back, although I'm running 6.x-3.0-dev, where the patch in #20 has been committed.

Indeed, adding:

      if (is_object($this->view->display[$display_id]->handler) !== TRUE) {
        continue;
      }

right before:

      $this->view->display[$display_id]->handler->unpack_translatables($translatable);

makes the error message go away, but the real problem lies deeper....

dawehner’s picture

And now the same error is back, although I'm running 6.x-3.0-dev, where the patch in #20 has been committed.

No it wasn't commited yet.

seanr’s picture

I can confirm that the patch in #20 worked for me in 7.x-3.0-rc1 as well.

pcambra’s picture

I found this problem reverting a feature that included views that missed dependencies.

Steps to reproduce (7.x):
- Create a feature with some views exported depending on views_data_export (I imagine that with other views' modules is the same, but this was my case)
- Do not include views_data_export as dependency in the feature info file
- On install process, (hook_install of other module i.e.) include a features_revert call of the module and views components (see drush fr command).

seanr’s picture

I don't think mine had anything to do with views_data_export; wasn't able to track down the cause but the patch did work. My issue was also during feature creation, not installation.

mrfelton’s picture

Similar problem, patch in #20 resolved it for me. (7.x)

Shawn DeArmond’s picture

#20 didn't apply to branch 7.x-3.x in Git because it didn't include the a/ and b/ prefixes. Here's an updated patch off of 7.x-3.x as of today.

betoscopio’s picture

Patch #39 is working fine in my case, using Drupal 7.9, views-3.x-dev from october 27. I'm not having more errors and i can export Calendar views.

dawehner’s picture

Status: Reviewed & tested by the community » Fixed
Issue tags: +dvcs11

Okay, great commited to 7.x-3.x and 6.x-3.x

Status: Fixed » Closed (fixed)
Issue tags: -dvcs11

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