Quantcast
Channel: Issues for Drupal core
Viewing all articles
Browse latest Browse all 292677

\Drupal\language\LanguageNegotiator does not handle PluginNotFoundException and break the site completely

$
0
0

Problem/Motivation

Drupal\language\LanguageNegotiator::initializeType does not handle Drupal\Component\Plugin\Exception\PluginNotFoundException at all. If a language negotiation plugin was removed by mistake or uninstalled improperly, the whole Drupal site will fail. All drush command or page rendering would be stopped by the issue.

Proposed resolution

I think the negotiation process should handle a missing plugin more gracefully. It should either simply log the error with watchdog or display a message on frontend to prompt user to handle it. This should not have been a site breaking problem.

Add a messenger argument to language.services.yml to handle exception with plugin missing message.

Remaining tasks

Patch
Add test case
code review

User interface changes

None

API changes

None

Data model changes

None

Release notes snippet

None


Viewing all articles
Browse latest Browse all 292677

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>