Can't import attached ECA model

Created on 14 October 2024, 6 months ago

Problem/Motivation

I couldn't even composer require drupal/discord_php without the -W (there was a conflict with the react/datagram you require being older), but once installed, importing the ECA model you provide in the project page from the UI resulted in this error message:

Unexpected error during import with operation create for eca.eca.process_ilwj9jq: The "discord_php_eca:ready" plugin does not exist. Valid plugin IDs for Drupal\eca\PluginManager\Event are: discord_php:ready, discord_php:message_create, etc..

💬 Support request
Status

Active

Version

2.0

Component

Code

Created by

🇮🇹Italy kopeboy Milan

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

Merge Requests

Comments & Activities

  • Issue created by @kopeboy
  • 🇮🇹Italy kopeboy Milan

    ..so in the end I couldn't try out this module.. How to use it? Is the drush command to start the React loop a necessary step (for what)? 🙏🏻

  • 🇧🇪Belgium lammensj

    Hi @kopeboy,

    I'm sorry that the instructions weren't clear enough and that you ran into problems when installing the module.

    Your assumption is correct: the drush-command is necessary to initiate the React-loop and to be able to continuously "react" to incoming messages, whether it's via code (event-subscribers) or an ECA-model.
    Talking about the example-model, can you ensure that ECA-submodule is enabled as well?

    I'll see if can I switch to the release candidate of team-reflex/discord-php:^10. At the moment, that 7.x-version is the only "stable" one.

  • 🇮🇹Italy kopeboy Milan

    Yep, discord_php_eca is enabled and I can see

      /**
       * {@inheritdoc}
       */
      public static function definitions(): array {
        $definitions = [];
    
        $definitions['ready'] = [
          'label' => 'Ready',
          'event_name' => DiscordEvents::READY,
          'event_class' => ReadyEvent::class,
        ];
    
        $definitions['message_create'] = [
          'label' => 'Message: create',
          'event_name' => DiscordEvents::MESSAGE_CREATE,
          'event_class' => MessageCreateEvent::class,
        ];
    
        return $definitions;
      }

    in web/modules/contrib/discord_php/modules/eca/src/Plugin/ECA/Event/DiscordPhpEvent.php

    but when I import the tar.gz eca model through the UI I get:
    Unexpected error during import with operation create for eca.eca.process_ilwj9jq: The "discord_php_eca:ready" plugin does not exist.

    I'm using eca 2.0.4 on drupal 10.3.6

  • Merge request !3Resolve #3480621 "Cant import attached" → (Open) created by lammensj
Production build 0.71.5 2024