0

When I try to update from drupal 8.27 to 8.35, I get the following error. How can I resolve this issue?

Failed: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "integer" plugin does not exist. in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 52 of C:\Users\ven_arajendra\Sites\devdesktop\offshore2-dev\docroot\core\lib\Drupal\Component\Plugin\Discovery\DiscoveryTrait.php).

  • @Smartsheeteng what wiil be the location for /tmp/log in windows enviroment i am using Acquia desktop – Aditya Joshi Jul 12 '17 at 21:46
  • Check you form and view displays for type: integer. That change to something that actually exists, e.g. number_integer. – Berdir Jul 13 '17 at 11:12
  • @Berdir you are right in some way. when i do a fresh drupal install with out any configuration and contributed module i am able to upgrade from 8.27-8.35 with out error. but i dont see Integer in my form and display of current site – Aditya Joshi Jul 17 '17 at 19:00
  • @berdir is there a way to list the available form/view display types? – Andrew Holt Jul 21 '17 at 11:15
  • with php code yes, they are plugins, so you can list the array keys of the field formatter and field widget plugin manager getDefinition() calls – Berdir Jul 21 '17 at 12:25
1

As an option just try to add this code in the enabled custom module in your project.

/**
 * Implements hook_entity_base_field_info_alter().
 */
function custom_entity_base_field_info_alter(&$fields, EntityTypeInterface $entity_type) {
  /** @var \Drupal\Core\Field\BaseFieldDefinition[] $fields */
  if ($entity_type->id() === 'menu_link_content' && isset($fields['weight'])) {
    $options = $fields["weight"]->getDisplayOptions('view');
    // Lets check if field definition is buggy.
    if ($options['type'] === 'integer') {
      $options['type'] = 'number_integer';
      // @TODO: This should be fixed in the menu_link_content core module.
      // @see https://www.drupal.org/node/2903161
      $fields['weight']->setDisplayOptions('view', $options);
    }
  }
}

Or try to use this patch from this issue

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.