Problem/Motivation

Wanted to uninstall this plugin, but as I enabled it in views, there is error message :

The website encountered an unexpected error. Please try again later.

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "views_ajax_get" plugin does not exist. Valid plugin IDs for Drupal\views\Plugin\ViewsPluginManager are: default in Drupal\Core\Plugin\DefaultPluginManager->doGetDefinition() (line 53 of core/lib/Drupal/Component/Plugin/Discovery/DiscoveryTrait.php).

Unable to restore and enable it back, need to rollback whole site.

Is it possible to create any patch which prevent such case?

Comments

coaston created an issue. See original summary.

leon kessler’s picture

Status: Active » Closed (duplicate)
Related issues: +#2635728: Uninstalling a module providing display extenders causes fatal errors

This is actually an issue with core, as it should be handling the dependencies.

Attached reference to issue for Drupal core.

robertoguzman’s picture

any update regarding this issue ?

arlina’s picture

Title: Unable to unistall » Unable to uninstall
Status: Closed (duplicate) » Needs review
StatusFileSize
new872 bytes

The core referenced issue does not have a working patch (that I could find at least). Until it gets fixed, maybe this module can remove the display extender on the uninstall hook - that's how metatag_views is doing it as well.
Here's a patch that works against 2.0.0.

fabiansierra5191’s picture

Status: Needs review » Reviewed & tested by the community

I had to uninstall this module and I got the same issue.
I tried patch #4 and works for me.

Moved to RTBC.

greg boggs’s picture

I was able to uninstall the module with this patch, but only partially, my views still generate the config from the module. Is there an upgrade path to 10.1? Can we mark this unsupported by 10.1? It's currently marked as supported and working 10.1 in composer.

greg boggs’s picture

Status: Reviewed & tested by the community » Needs work
catch’s picture

You might be able to manually resave your views to clean up the config.

rcodina’s picture

Editing views and saving them doesn't work for me. I just have had to manually editing view's yml files to remove this module's configuration.

greg boggs’s picture

That was also what I had to do.

tuwebo’s picture

Not sure about the implications of this workaround (it might break your site, take it with a grain of salt) , but it seems it is working for me if I run it before uninstalling:
drush cset --input-format=yalm views.settings display_extenders default

You might want to check the views.settings configuration before running it, executing:
drush cget views.settings

and then bring back the configuration that was there before the uninstall, e.g.:
drush cset --input-format=yaml views.settings display_extenders '["metatag_display_extender", "ajax_history"]'

Be aware, this workaround is not tested, I am posting it as I am facing the issue.