drupal-graphql / graphql

GraphQL integration for Drupal 9/10
286 stars 202 forks source link

The "language-graphql" plugin does not exist #611

Closed webflo closed 6 years ago

webflo commented 6 years ago

Similar issue to https://github.com/drupal-graphql/graphql/issues/575

Happens again in beta6

AndyRead commented 6 years ago

I'm getting this same message trying to install on Drupal 8.5.3. composer require is fetching graphql 8.x-3.0-beta8. I get the error when I try to enable graphql, but it's left thinking it installed but not usable (/graphql returns exception error message) and fails to uninstall again! Composer update has updated drupal to 8.5.4, but no difference.

AndyRead commented 6 years ago

But fubhy's commit 8445d04 above seems to fix the issue (clean uninstall and install at least).

fubhy commented 6 years ago

So this is fixed? Please re-open if that's not the case.

Daveiano commented 6 years ago

I tried to install GraphQL 8.x-3.0-beta8, same problem:

Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: The "language-graphql" plugin does not exist. in /var/www/.../core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php on line 52

aaleksan commented 6 years ago

Same problem with GraphQL 8.x-3.0-beta8, which version should we install for a functioning module that works with languages. Thanks

naitschi commented 6 years ago

Got the same Problem as @Daveiano .

davidspiessens commented 6 years ago

Same problem here.

rfnbnkr commented 6 years ago

I have a same problem

yookoala commented 4 years ago

I ran into similar issue today. My solution:

Suppose you don't have any data stored in database of this module (which there should be none, to my understanding).

  1. Open core/modules/language/src/LanguageNegotiator.php.
  2. Go to the public function initializeType().
  3. Find these line:
        if (!isset($this->negotiatedLanguages[$method_id])) {
          $this->negotiatedLanguages[$method_id] = $this->negotiateLanguage($type, $method_id);
        }
  4. Change to
        if (!isset($this->negotiatedLanguages[$method_id])) {
          if ($method_id != 'language-graphql') {
            $this->negotiatedLanguages[$method_id] = $this->negotiateLanguage($type, $method_id);
          }
        }
  5. Use drush to uninstall the graphql module.
  6. Do whatever you want (e.g. reinstall the module of later version).
yookoala commented 4 years ago

Part of the confusion is that the language negotiator doesn't handle the PluginNotFoundException error

It should not have been a site breaking issue. It should be handled in a more graceful manner.

I'm pushing to change the behaviour here: https://www.drupal.org/project/drupal/issues/3134349

Please endorse and follow the issue there. Thanks.

freality commented 3 years ago

I've run into this issue, but with plugin ID 'language-graphql-operation'. @yookoala solution helps restore your system. But if the problem lingers after uninstalling the graphql module. Remove the offending plugin id from your language.types configuration, eliminates the error state.

I hope this tip helps any persons encountering this issue.

Rar9 commented 2 years ago

@freality - How to remove this