Unable to fix an existing model after an action plugin rename

Created on 12 January 2023, almost 2 years ago
Updated 26 January 2023, almost 2 years ago

Problem/Motivation

In the process of making http_client_swapi β†’ module, I was frequently making changes to the underlying API and testing them in ECA. Since the HTTP Client Manager module makes any operation available as a plugin, making any changes to the operation names (even just changing the case) means the action plugin name has changed.

I found out that if an ECA model references a plugin that doesn't exist (because I changed from PersonByID to PersonById) it's impossible to fix the model so that it can process again. The only recourse was to fix the action plugin by changing the operation (and by extension the plugin) name.

Things I tried that all resulted in an error:

  • Edit the model and delete/re-add the action that references the action, then try to save
    The "http_client_manager_command:swapi:PersonByID" plugin does not exist.
  • Edit the model and delete the action (but don't replace it), then try to save
    The "http_client_manager_command:swapi:PersonByID" plugin does not exist.
  • Export config, fix the plugin name, import config
    Unexpected error during import with operation update for eca.eca.process_svtapnc: The "http_client_manager_command:swapi:PersonByID" plugin does not exist.
  • Add $settings['eca_disable'] = TRUE; in settings.php and retry all of the above

Steps to reproduce

  1. Create an ECA model with an action plugin (for example by installing and using http_client_swapi)
  2. Change the name of the plugin (for example by changing the case of an operation in http_client_swapi module)
  3. Try to fix the ECA model any way you can think of without reverting the plugin name change

Proposed resolution

It's probably rare that the ECA provided plugins will change names and cause this error. It's probably also rare that plugins provided by 3rd party modules will change names and cause this error. But it's not impossible.

In order to avoid problems in the future ECA should be able to allow a model to be fixed in away that doesn't rely on "fixing" the action plugin, e.g. being able to delete the offending action and saving.

πŸ“Œ Task
Status

Fixed

Version

1.2

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States rocketeerbkw Austin, Tx

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

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024