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.
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
Comment | File | Size | Author |
---|---|---|---|
#6 | switcher_not_working-2579055-6.patch | 332 bytes | Leon Kessler |
Comments
Comment #2
thomasintuiz CreditAttribution: thomasintuiz commentedComment #3
stewest CreditAttribution: stewest commentedI'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
Comment #4
kay.beissert CreditAttribution: kay.beissert commentedSame 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
Comment #5
yeaha CreditAttribution: yeaha commentedhad 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
Comment #6
Leon Kessler CreditAttribution: Leon Kessler at Mirum Agency commentedPatch for those who need it...
Comment #8
kala4ekComment #9
kala4ek