Problem/Motivation

PluginHelper::createIndexPlugin() ignores the caught PluginException's message:

    catch (PluginException) {
      throw new SearchApiException("Unknown $type plugin with ID '$plugin_id'");

However, in the case that a plugin ID is not found, PluginException now includes a helpful message which lists the existing plugin IDs. This is very useful when you've made a typo!

Steps to reproduce

Proposed resolution

Use the message from the caught exception as the message in the new one.

Remaining tasks

Issue fork search_api-3448241

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

joachim created an issue. See original summary.

drunken monkey made their first commit to this issue’s fork.

drunken monkey’s picture

Status: Active » Needs review

Makes sense, thanks for the suggestion!
Please test/review the MR.

joachim’s picture

Status: Needs review » Reviewed & tested by the community

Looks good!

drunken monkey’s picture

Status: Reviewed & tested by the community » Fixed

Good to hear, thanks for reporting back!
Merged.

  • drunken monkey committed a170b720 on 8.x-1.x
    Issue #3448241 by drunken monkey: Fixed PluginHelper::createIndexPlugin...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.