The "views" plugin does not exist

Created on 14 December 2023, 6 months ago
Updated 5 April 2024, 2 months ago

Problem/Motivation

Site crashes when trying to uninstall the module

Steps to reproduce

Uninstall the Views module and then try to uninstall the search engine or main module

πŸ› Bug report
Status

Fixed

Version

4.0

Component

Code

Created by

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

Comments & Activities

  • Issue created by @wilso929
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin

    Uninstalling the views module should not be possible when simple_sitemap_views is installed. I just double-checked and tested just to make sure. Your Drupal profile seems to be new so my instinct is to ask you to make sure you are uninstalling modules correctly - through the UI or through the command 'drush pmu views'. Please don't remove files from the server without uninstalling the modules first. In case you did, put the files back and then uninstall.

  • πŸ‡¨πŸ‡­Switzerland maenjuel

    I also just had an error trying to uninstall the module, maybe related to this issue Views might be part of it?

    The logs show the following error after trying to uninstall the module:

    AH01071: Got error 'PHP message: Uncaught PHP Exception Drupal\\Component\\Plugin\\Exception\\PluginNotFoundException: "The "views" plugin does not exist. Valid plugin IDs for Drupal\\simple_sitemap\\Plugin\\simple_sitemap\\UrlGenerator\\UrlGeneratorManager are: entity, index, arbitrary, entity_menu_link_content, custom" at [Drupal root]/core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php line 53', referer: [site]/admin/modules/uninstall/confirm
    

    The error appeared when I tried to uninstall both sub modules at the same time, but the "Simple XML Sitemap (Views)" sub module was uninstalled after anyway.

    Uninstalling "Simple XML Sitemap (Search engines)" first and then uninstalling "Simple XML Sitemap (Views)" worked. However, uninstalling the "Simple XML Sitemap" module (the "main" module, so to speak) threw the same error, and can't be uninstalled.

    Views and Views UI are both installed, in case that would be relevant.

    Tested on Drupal 10.0.9 and Simple XML sitemap 4.1.8.

  • πŸ‡¨πŸ‡­Switzerland maenjuel

    I tried a thing or two and I think I narrowed down where the error comes from.

    First of all, I also tried on Drupal 10.2.2 just to make sure the error also appears with newest core version (and it does ;)).

    So, said error appears when a sitemap type has "Views URL generator" selected under /admin/config/search/simplesitemap/types/[type]

    If the "Views URL generator" is removed from the "URL generators" selection field, uninstalling the module is no problem. If the selection is there, uninstalling the module throws an error.

  • Following #4 worked for me. Before it wouldn't let me uninstall "Simple XML Sitemap" after already uninstalling "Simple XML Sitemap (Views)".

    Although I did re-install "Simple XML Sitemap (Views)" to remove it from my URL Generators and then uninstalled both modules shortly after, I probably could've done without the re-installation step.

    Thank you!

  • Assigned to gbyte
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin

    The simple_sitemap_views submodule should clean up after itself. Wondering if we should put in additional checks and throw a warning instead of an exception. I'll look into it.

    • gbyte β†’ committed 99b6aa3c on 4.x
      Issue #3408874 by wilso929, gbyte, maenjuel: The "views" plugin does not...
  • Status changed to Fixed 3 months ago
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin
  • πŸ‡©πŸ‡ͺGermany gbyte Berlin
  • Automatically closed - issue fixed for 2 weeks with no activity.

Production build 0.69.0 2024