PluginNotFoundException

Created on 28 September 2023, about 1 year ago
Updated 16 May 2024, 7 months ago

Problem/Motivation

error message

when I run update.php moving a d9 site to d10 or when I try to uninstall sva from the upgraded site I get the following messages (note the mismatched plugin name):

// /update.php & /admin/modules/uninstall/confirm & the display of a view using the plugin
                Failed: Drupal\Component\Plugin\Exception\PluginNotFoundException: The "simple_views_accordion" plugin does not exist. Valid plugin IDs for Drupal\views\Plugin\ViewsPluginManager are: entity_reference_revisions, serializer, simple_views_accordion_simple_views_accordion, default, default_summary, table, rss, grid, html_list, entity_reference, unformatted_summary, opml, grid_responsive in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of /var/www/html/web/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).
// terminal
drush pmu simple_views_accordion

In DiscoveryTrait.php line 53:
                                                                                         
  The "simple_views_accordion" plugin does not exist. Valid plugin IDs for Drupal\views  
  \Plugin\ViewsPluginManager are: entity_reference_revisions, serializer, simple_views_  
  accordion_simple_views_accordion, default, default_summary, table, rss, grid, html_li  
  st, entity_reference, unformatted_summary, opml, grid_responsive
Failed to run drush pmu simple_views_accordion: exit status 1

Steps to reproduce

  1. enable module on a d9 site: `drush en simple_views_accordion` (succeeds)
  2. add to a view & save
  3. export configuration: `drush cex` (succeeds; saves views.view.{{view_name}}.yml with `style: type: simple_views_accordion)`
  4. uninstall module from the d9 site: `drush pmu simple_views_accordion` (sometimes succeeds; sometimes fails)
  5. upgrade the d9 site to d10
  6. reinstall the module into the d10 site: `drush en simple_views_accordion` (succeeds)
  7. reimport configuration: `drush cim` (succeeds)
  8. visit view that uses the plugin on the d10 site (fails: see 1st error message from web pages)
  9. uninstall module from the d10 site: `drush pmu simple_views_accordion` (fails; see 2nd error message from terminal)

Proposed resolution

Make the project/plugin name/path/id consistent; it is sometimes sva, sometimes simple_views_accordion and sometimes simple_views_accordion_simple_views_accordion.

Remaining tasks

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Needs work

Version

1.0

Component

Code

Created by

🇺🇸United States kay_v

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

Merge Requests

Comments & Activities

  • Issue created by @kay_v
  • 🇺🇸United States kay_v

    clarify issue summary

  • 🇺🇸United States kay_v

    removing the 2nd error; it appears to be an issue with pathauto

  • 🇺🇸United States kay_v

    I'm updating the summary; it seems Drush pmu is inconsistent - sometimes it succeeds and others it does not:

    ddev drush pmu simple_views_accordion
    
    In DiscoveryTrait.php line 53:
                                                                                             
      The "simple_views_accordion" plugin does not exist. Valid plugin IDs for Drupal\views  
      \Plugin\ViewsPluginManager are: entity_reference_revisions, serializer, simple_views_  
      accordion_simple_views_accordion, default, default_summary, table, rss, grid, html_li  
      st, entity_reference, unformatted_summary, opml                                        
                                                                                             
    
    Failed to run drush pmu simple_views_accordion: exit status 1
    
  • Status changed to Postponed: needs info about 1 year ago
  • 🇳🇮Nicaragua edysmp Nicaragua

    Hey @kay_v,
    Assuming that in the step `5. upgrade the d9 site to d10` you are exporting the configuration,
    I'm not able to reproduce this with a fresh d9 install and then making the upgrade to d10.1. Something more should be happen on your end that i'm not able to reproduce.

    Also i don't have to make the install/uninstall steps when doing a upgrade.

  • Status changed to Closed: cannot reproduce about 1 year ago
  • 🇺🇸United States kay_v

    Marking as closed.

    Thanks @edysmp! I've also not been able to reproduce the issue, tho it kept happening repeatedly for so long. Huh! Who knows what made the issue come up? Good to have it resolved!

  • Status changed to Needs work 7 months ago
  • 🇳🇮Nicaragua edysmp Nicaragua

    Hey @kay_v,

    You were right. The issue is still there.

    It happens because the renaming of the plugin id from `simple_views_accordion_simple_views_accordion` to `simple_views_accordion` in the dev branch.

    I will post a MR shortly with a post update hook that will fix things.

    • edysmp committed bb58c071 on 1.0.x
      Issue #3390451 by kay_v, edysmp: PluginNotFoundException
      
Production build 0.71.5 2024