Error in LanuageDropdownForm.php

Created on 13 January 2021, almost 4 years ago
Updated 16 March 2023, almost 2 years ago

Version 8.x-2.0-beta4
Drupal 9.1.2

I get the following error message in the Recent log messages:

Error: Call to a member function getName() on null in Drupal\lang_dropdown\Form\LanguageDropdownForm->buildForm() (linel 211 in /var/www/vhosts/daproverb.be/httpdocs/modules/lang_dropdown/src/Form/LanguageDropdownForm.php).

Can you please fix this?

Best regards,
Jacques

🐛 Bug report
Status

Active

Component

Code

Created by

🇧🇪Belgium redseujac

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • 🇮🇳India prashant.c Dharamshala

    Can you please test the new version 8.x-2.0 and let us know if this issue persists?

  • 🇧🇬Bulgaria joro78

    We have spot the same problem. It emerges when one tries to switch language for a content that is not so far translated. It is very irritating and could make bad impression on the user. A possible solution is to hide the block from it's options, when just one language for the node is available. This, however, is not very user friendly and changes the overall layout. Consider it as a bug.

    Error: Call to a member function getName() on null in Drupal\lang_dropdown\Form\LanguageDropdownForm->buildForm() (line 229

    Using Drupal 10.3.10 and version 8.x-2.1 of the module.

Production build 0.71.5 2024