Problem/Motivation

On accessing the page

/admin/structure/synonyms

we are getting an error.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "field:synonyms.behavior.autocomplete_taxonomy_term_content_category_field_synonyms" plugin does not exist. Valid plugin IDs for Drupal\synonyms\ProviderPluginManager are:

Also the synonyms autocomplete is not working

Steps to reproduce

  1. Install the 2.1.1 version of the module
  2. Go to /admin/structure/synonyms
  3. You will get a WSOD error page
  4. On accessing /admin/reports/dblog we will get the aforementioned error.

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Comments

binnythomas created an issue. See original summary.

binnythomas’s picture

Issue summary: View changes
binnythomas’s picture

I have traced the problem to Drupal\synonyms\SynonymsService\ProviderService

/**
   * Get a list of enabled synonym providers.
   *
   * @param string $entity_type
   *   Entity type for which to conduct the search.
   * @param string|array $bundle
   *   Single bundle or an array of them for which to conduct the search. If
   *   null is given, then no restrictions are applied on bundle level.
   *
   * @return \Drupal\synonyms\Entity\Synonym[]
   *   The array of enabled synonym providers
   */
  public function getSynonymConfigEntities($entity_type, $bundle) {
    $entities = [];

    if (is_scalar($bundle) && !is_null($bundle)) {
      $bundle = [$bundle];
    }

    foreach ($this->entityTypeManager->getStorage('synonym')->loadMultiple() as $synonym_config) {

      $provider_instance = $synonym_config->getProviderPluginInstance();
      $provider_definition = $provider_instance->getPluginDefinition();
      if ($provider_definition['controlled_entity_type'] == $entity_type && (!is_array($bundle) || in_array($provider_definition['controlled_bundle'], $bundle))) {
        $entities[] = $synonym_config;
      }
    }

    return $entities;
  }
devad’s picture

I have tested quickly at simplytest.me following your steps to reproduce precisely... and everything works fine. Synonyms 2.1.1 with D9.5.0-beta2 and PHP7.4.

Can you reproduce this error at clean Drupal + Synonyms installation? If yes, please send the exact config. Drupal version? PHP version? Database type and version?

arti_parmar’s picture

I have tested at simplytest.me following your steps to reproduce precisely and everything works fine for me . i used Synonyms 2.1.1 with D9.4.7 and PHP7.4.20

binnythomas’s picture

Status: Active » Closed (works as designed)

I am closing this issue. It seems this error has gone away after downgrading the module to 8.x version and then upgrading it. This could have been due to a faulty installation or a faulty upgrade.