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.
If facets module is enabled, and if you set in admin/config/regional/language/detection the option 'Session' as your detection language method, the site will crash with following error:
Error: Call to a member function getId() on null in facets_language_switch_links_alter() (line 373 of ... web/modules/contrib/facets/facets.module
Code assumes that
$link['language']
contains an object, but the object is missing.
This happened with core 8.5.1 and facets 1.0-beta2.
The weight of the language detection does not affect, so you just need to select the 'Session' option.
Comment | File | Size | Author |
---|---|---|---|
#10 | facets-language-detection-2959215-10-8.patch | 582 bytes | VitaliyB98 |
#6 | 2959215.patch | 969 bytes | borisson_ |
Comments
Comment #2
borisson_I'm assuming this also happens on the latest dev version, so changing version. I can't seem to reproduce this though. I did attach a patch that in theory should resolve this, but as I can't reproduce this - I'm going to need more information on when this happens
PS: It seems you (like many others – it's really easy to misinterpret) are confused by the "Issue tags" field. As the guidelines state, they aren't meant for free text tags related to the issue, but only for specific categorization purposes, usually by module maintainers.
So, if you aren't sure your current usage is correct, please just leave the field empty.
Comment #3
eldrupalista CreditAttribution: eldrupalista as a volunteer commentedThank you, that solved the problem.
Comment #4
borisson_Setting to needs review to have the testbot test this as well.
Comment #6
borisson_Now passes tests as well.
Comment #8
borisson_Fixed, based on @andreasderijcke's feedback at drupal belgium's sprint day.
Comment #10
VitaliyB98 CreditAttribution: VitaliyB98 at Internetdevels commentedJust re-patch for beta-2
Comment #11
VitaliyB98 CreditAttribution: VitaliyB98 at Internetdevels commented