I am getting the following error:

PHP Fatal error: Call to undefined function locale_language_list() in /var/www/vhosts/metrosource/drupal-7.0/modules/views/modules/translation/views_handler_filter_node_language.inc on line 14

Here is line 14
14 $languages = array_merge($languages, locale_language_list());

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

bojanz’s picture

Status: Active » Postponed (maintainer needs more info)

1. Upgrade to 7.x-3.x-dev.
2. Make sure you have the Locale module enabled.
3. Let me know if this helps.

calbert’s picture

Status: Postponed (maintainer needs more info) » Active

I now get this error

The page shows, but I get the following

Notice: Undefined index: format in views_handler_field_markup->render() (line 31 views/handlers/views_handler_field_markup.inc)

Here is the code

29 function render($values) {
30 $value = $this->get_value($values);
31 $format = $this->get_value($values, $this->aliases['format']);
32 $format = is_numeric($this->format) ? $this->format : $format;
33 if ($value) {
34 $value = str_replace('

', '', $value);
35 return check_markup($value, $format, '');
36 }
37 }

dawehner’s picture

Status: Active » Fixed

This problems has already an issue on #1091980: Notice: Undefined index: format in views_handler_field->get_value() (line 738 of views_handler_field.inc).

The other problem is fixed by the dev so mark this as fixed.

Status: Fixed » Closed (fixed)

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

merlinofchaos’s picture

Version: 7.x-3.0-alpha1 » 7.x-3.x-dev
Priority: Major » Critical
Status: Closed (fixed) » Active

We should not require locale.module to be enabled. That's what module_exists is for.

Marking critical since this makes the 'query' settings modal inaccessible.

dawehner’s picture

Status: Active » Needs review
FileSize
4.94 KB

This replaces all locale_language_list calls to views_language_list also the locale versions of the handlers

A small follow up http://drupal.org/node/1181744

merlinofchaos’s picture

Status: Needs review » Reviewed & tested by the community
dawehner’s picture

Version: 7.x-3.x-dev » 6.x-3.x-dev
Status: Reviewed & tested by the community » Patch (to be ported)

Commited to 7.x-3.x but needs some porting for 6.x-3.x

dawehner’s picture

Status: Patch (to be ported) » Needs review
FileSize
4.59 KB

Here is a patch for 6.x-3.x, it would be great to get some feedback/review here.

dawehner’s picture

Status: Needs review » Fixed

Just tried out this and commited it,

Status: Fixed » Closed (fixed)

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

jkopel’s picture

Priority: Critical » Normal
Status: Closed (fixed) » Needs review
FileSize
718 bytes

I ran into this bug and found another instance of locale_language_list().
Patch attached, fingers crossed that I did this all correctly...

dawehner’s picture

Seems fine just from the actual change. It would be cool someone could reproduce the problem and see whether the patch actually fixes it at the end.

jkopel’s picture

Version: 6.x-3.x-dev » 7.x-3.x-dev

Fair enough, I will try and make a simple(r) view to reproduce it.
One the other hand, if locale module is disabled (as it is on the effected site), then the locale_language_list () function is undefined and should probably not be called under any circumstance.

I also switched this back to the 7.3.X branch since that is what I patched.
Thanks!

safetypin’s picture

I'm pretty sure I just ran into this problem - using Views 7.x-3.7 - applying the patch in #12 resolved the problem for me.

subramani.msc2011’s picture

I face a same Problem views . I have applied a #12 patch and resolved. Now working fine. Thanks

fizk’s picture

Issue summary: View changes

Just ran into this issue and #12 fixed it. Please commit.

Cameron Tod’s picture

Yep, there seems to be a few remaining calls to locale_language_list hanging around in 7.x-3.x. I think this catches them all.

Status: Needs review » Needs work

The last submitted patch, 18: 1094712-views_call_undefined_locale_language_list.patch, failed testing.

dawehner’s picture

Status: Needs work » Needs review
dawehner’s picture

Thank you for providing a patch. This seems to be a 100% valid fix here. (no idea why the locale one is needed but it is better to be safe).

ChaseOnTheWeb’s picture

Re-roll for views 3.20 and current 3.x-dev

silverham’s picture

Status: Needs review » Reviewed & tested by the community

#22 Works for me. Was getting error from search_api_stats module at /admin/reports/search-api-report/details

DamienMcKenna’s picture

  • DamienMcKenna committed 36636f9 on 7.x-3.x
    Issue #1094712 by dawehner, jkopel, Cameron Tod, DamienMcKenna,...
DamienMcKenna’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks everyone.

Status: Fixed » Closed (fixed)

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