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.
After installing views 3.2 i get the following error, when trying to login:
Fatal error: Call to undefined function language_fallback_get_candidates() in modules/views/modules/field/views_handler_field_field.inc on line 210
Comment | File | Size | Author |
---|---|---|---|
#14 | 1450268.patch | 890 bytes | dawehner |
#12 | 1450268.patch | 888 bytes | dawehner |
#5 | 1450268-fast.patch | 826 bytes | dawehner |
Comments
Comment #1
mhahndl CreditAttribution: mhahndl commentedsame here
Comment #2
3rdLOF CreditAttribution: 3rdLOF commentedThird
Comment #3
mhahndl CreditAttribution: mhahndl commentedlook at #1438986: Field language conditions are missing in the query.
Comment #4
3rdLOF CreditAttribution: 3rdLOF commentedI try applying that patch, but fails.
Comment #5
dawehnerThat's indeed quite critical. So probably there is a need for 3.3
I committed this patch to 7.x
Comment #6
das-peter CreditAttribution: das-peter commentedI'd say this makes absolutely sense :)
Comment #7
kevin.klika CreditAttribution: kevin.klika commentedThat patch doesnt make sense to me.
Also, unzipped new module over the broken release, and cleared caches -- no fix.
Comment #8
dawehnerWhy does this patch no sense for you?
Comment #9
a.siebel CreditAttribution: a.siebel commentedThe patch didn't solve the problem for me. I habe locale enabled and the error still occurs. (with views 3.3)
I completly removed the if clause and always set
> $language_fallback_candidates[] = LANGUAGE_NONE;
as temporary solution.
Comment #10
a.siebel CreditAttribution: a.siebel commentedI mark this issue as active (see #9)
Comment #11
das-peter CreditAttribution: das-peter commentedOh boy, Daniel will hate me for this :|
Looks like what we really need is
require_once DRUPAL_ROOT . '/includes/language.inc';
As
language_fallback_get_candidates()
resides in this include file an not in the locale module.The locale module just uses this file too, thus if the locale module handles language fallback stuff before views does the file is already included. But if views comes first we're in a mess.
Could someone who experiences this error try and add this line before the call of
language_fallback_get_candidates()
?Feedback appreciated!
Comment #12
dawehnerOh man.
Here is a small patch. Please be sure that the logic is right here. This function already takes care of
Comment #13
das-peter CreditAttribution: das-peter commentedTested on my site - language fallback condition is present and query works.
I didn't test without language fallback or without locale.
However, what about having the
requrie_once
inside theif
?Comment #14
dawehnerThis makes sense
Comment #15
kevin.klika CreditAttribution: kevin.klika commentedPatch #1450268-14: Fatal error: Call to undefined function language_fallback_get_candidates() did not apply correctly on martplug profile. Git couldn't find the file.
HOWEVER, manually applying the patch to the correct file worked.
Not sure if this is good enough for [reviewed and tested by the community], so I'm leaving it as [needs review].
Comment #16
adamharms CreditAttribution: adamharms commentedThe patch in #4 worked for me with my error with locale turned on, but the view that returned the error is not returning any values
Comment #17
dawehnerI got this patch in.
Comment #18
3rdLOF CreditAttribution: 3rdLOF commented$4 worked like butter for me. Right on time to.
Thanks for the prompt reply.
Comment #19
mhahndl CreditAttribution: mhahndl commented#14 works for me. #5 not.
Comment #20
Niklas Fiekas CreditAttribution: Niklas Fiekas commentedSince dereine committed http://drupalcode.org/project/views.git/commitdiff/a802857 (#14), I think this is fixed.
Comment #21
drcho CreditAttribution: drcho commented#20 seems to work for me :-) Thank you!
Comment #22
Weehaa CreditAttribution: Weehaa commentedSame problem after updating to Views 3.3 today. (only for one of my pages that work with Views).
Could fix it with #20 comment.
Comment #24
MurzGot same problem on Views 3.3, going back to 3.2 solves the error.
Comment #25
myrto CreditAttribution: myrto commentedit seems that what the patch does is not included in Views.3.3 , has anyone noticed the same problem, and should we report the problem opening a new - issue for Views.3.3?
Comment #26
dawehnerIt's at least fixed in 7.x-3.x-dev
Comment #27
Anonymous (not verified) CreditAttribution: Anonymous commentedJust got this error on a clean install of martplug (http://ftp.drupal.org/files/projects/martplug-7.x-1.x-dev-core.tar.gz) when trying to add a new product.
As a relative newbie to Drupal, is it easier to upgrade/downgrade Views module or try to decipher and apply the patch?
Comment #28
tim.plunkettMarking back, it's fixed in dev. It will be in 7.x-3.4
Comment #29
brandy.brown CreditAttribution: brandy.brown commentedI don't even have the document that is listed in these patches ...
Comment #30
Tino CreditAttribution: Tino commentedConfirming that 3.x-dev (2012-May-01) fixed this.