Hi, my problem is pretty simple:

Language switcher is working everywhere but just in one page.
I spent hours trying to find out what is going on but I was not able to solve.

If I'm logged in it works normally, the problem appears only with non authenticated users.

N.B. somebody over the internet says that the language switcher is not appearing when non auth. This is not my case because it's appearing everywhere, it's just not switching the language.

This is the page where the switcher is not working: https://www.binarysystem.eu/en/apply-demo

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

thomasintuiz created an issue. See original summary.

thomasintuiz’s picture

Issue summary: View changes
stewest’s picture

I'm getting the same issue with Anonymous users.

I've checked all permissions, which seem fine.

When I am Not logged in, and I switch languages (I can see Language switcher), I get this white screen and error.

InvalidArgumentException: Field status is unknown. in Drupal\Core\Entity\ContentEntityBase->getTranslatedField() (line 474 of core/lib/Drupal/Core/Entity/ContentEntityBase.php).

Using Drupal 8.0.3

kay.beissert’s picture

Same here, if I'm logged in as administrator, everything works. But for guests, nothing happens. I have an error message "Uncaught ReferenceError: Drupal is not defined" for the lang_dropdown.js. What can I do?

I'm on Drupal 8.2

yeaha’s picture

had the same referenceerror:Drupal is not defined, changed at the top in js/lang_dropdown.js
"(function ($, drupalSettings) {" to
"(function ($, Drupal, drupalSettings) {" and at bottom of file: "})(jQuery, drupalSettings);" to: "})(jQuery, Drupal, drupalSettings);"

and then in lang_dropdown.libraries.yml add dependency of drupal:
dependencies:
- core/jquery
- core/drupal
- core/drupalSettings

Leon Kessler’s picture

Version: 7.x-2.5 » 8.x-2.x-dev
Status: Needs work » Needs review
FileSize
332 bytes

Patch for those who need it...

Status: Needs review » Needs work

The last submitted patch, 6: switcher_not_working-2579055-6.patch, failed testing.

kala4ek’s picture

Assigned: thomasintuiz » kala4ek
Status: Needs work » Needs review
kala4ek’s picture

Assigned: kala4ek » Unassigned
Status: Needs review » Fixed

  • kala4ek committed 5b96063 on 8.x-2.x
    Issue #2579055 by Leon Kessler, thomasintuiz, yeaha, kala4ek: Switcher...

Status: Fixed » Closed (fixed)

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