When running database updates I get the following error:

Error: Call to undefined method Drupal\Core\Language\LanguageManager::getLanguageConfigOverride() in /var/www/html/web/modules/contrib/media_directories/modules/media_directories_editor/media_directories_editor.install on line 73

Comments

albertski created an issue. See original summary.

albertski’s picture

Status: Active » Needs review
StatusFileSize
new3.21 KB

To prevent this error, checking if the interface of ConfigurableLanguageManagerInterface.

ytsurk’s picture

Thank you for reporting this issue. I think it's important to adapt the update_hooks as they will (maybe) copied in the future.

I found a similar issue here #2484125: Simpletest gives a false pass to InstallerTranslationMultipleLanguageForeignTest in CLI and TestBot, but not GUI and checking for the interface makes sense to me. I will test your patch soonish ...

I guess config translation needs to be disabled to reproduce?

Why do you use \Drupal::service('language_manager') instead of \Drupal->languageManager(), I think using the languageManager function is clearer and more reliable?

ytsurk’s picture

Status: Needs review » Reviewed & tested by the community
StatusFileSize
new3.54 KB

Updated your patch, thanks again!

albertski’s picture

Good point. I agree \Drupal->languageManager() is clearer. I believe config translations were disabled. Thanks.

  • ytsurk committed b4b8548 on 8.x-1.x
    Issue #3134449 by albertski, ytsurk: Call to undefined...
ytsurk’s picture

Status: Reviewed & tested by the community » Fixed

Status: Fixed » Closed (fixed)

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