Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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());
Comment | File | Size | Author |
---|---|---|---|
#24 | views-n1094712-24.patch | 1.33 KB | DamienMcKenna |
| |||
#22 | 1094712-views_call_undefined_locale_language_list-22.patch | 2.57 KB | ChaseOnTheWeb |
| |||
#18 | 1094712-views_call_undefined_locale_language_list.patch | 2.54 KB | Cameron Tod |
#12 | views-not-rely-locale-1094712-12.patch | 718 bytes | jkopel |
#9 | 1094712-not-rely-locale.patch | 4.59 KB | dawehner |
Comments
Comment #1
bojanz CreditAttribution: bojanz commented1. Upgrade to 7.x-3.x-dev.
2. Make sure you have the Locale module enabled.
3. Let me know if this helps.
Comment #2
calbert CreditAttribution: calbert commentedI 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 }
Comment #3
dawehnerThis 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.
Comment #5
merlinofchaos CreditAttribution: merlinofchaos commentedWe 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.
Comment #6
dawehnerThis 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
Comment #7
merlinofchaos CreditAttribution: merlinofchaos commentedComment #8
dawehnerCommited to 7.x-3.x but needs some porting for 6.x-3.x
Comment #9
dawehnerHere is a patch for 6.x-3.x, it would be great to get some feedback/review here.
Comment #10
dawehnerJust tried out this and commited it,
Comment #12
jkopel CreditAttribution: jkopel commentedI ran into this bug and found another instance of locale_language_list().
Patch attached, fingers crossed that I did this all correctly...
Comment #13
dawehnerSeems 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.
Comment #14
jkopel CreditAttribution: jkopel commentedFair 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!
Comment #15
safetypinI'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.
Comment #16
subramani.msc2011 CreditAttribution: subramani.msc2011 commentedI face a same Problem views . I have applied a #12 patch and resolved. Now working fine. Thanks
Comment #17
fizk CreditAttribution: fizk commentedJust ran into this issue and #12 fixed it. Please commit.
Comment #18
Cameron Tod CreditAttribution: Cameron Tod commentedYep, 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.
Comment #20
dawehner18: 1094712-views_call_undefined_locale_language_list.patch queued for re-testing.
Comment #21
dawehnerThank 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).
Comment #22
ChaseOnTheWebRe-roll for views 3.20 and current 3.x-dev
Comment #23
silverham CreditAttribution: silverham at EY Digital commented#22 Works for me. Was getting error from search_api_stats module at /admin/reports/search-api-report/details
Comment #24
DamienMcKennaRerolled after one of the changes was fixed in #2428065: Fatal error in views_handler_field_locale_language.inc if locale is not enabled.
Comment #26
DamienMcKennaCommitted. Thanks everyone.