Issues with action plugins while PostService not configured yet

Created on 18 December 2024, 4 days ago

Problem/Motivation

When ECA wants to collect the list of action plugins, it runs into the following issues:

[error]  The action plugin bsky_add_facets can not be initialized. ECA is ignoring this action. The issue with this action: Cannot load the "key" entity with NULL ID. 
 [error]  The action plugin bsky_create_post can not be initialized. ECA is ignoring this action. The issue with this action: Circular reference detected for service "bsky.post_service", path: "bsky.post_service". 
 [error]  The action plugin bsky_add_image can not be initialized. ECA is ignoring this action. The issue with this action: Circular reference detected for service "bsky.post_service", path: "bsky.post_service". 
 [error]  The action plugin bsky_send_post can not be initialized. ECA is ignoring this action. The issue with this action: Circular reference detected for service "bsky.post_service", path: "bsky.post_service". 

This is caused by the constructor of the PostService:

    $this->configuration = $configFactory->get('bsky.settings');
    $handle = $this->configuration->get('handle');
    $app_key = $keyRepository->getKey($this->configuration->get('app_key'));
    $this->api = new BlueskyApi($handle, $app_key->getKeyValue());
    $this->postService = new BlueskyPostService($this->api);

If I comment those lines out, the action plugins can properly be initialized. I think the code needs to be made a bit safer so that it makes sure, that the expected keys are actually available.

πŸ› Bug report
Status

Active

Version

1.0

Component

Code

Created by

πŸ‡©πŸ‡ͺGermany jurgenhaas Gottmadingen

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

Merge Requests

Comments & Activities

Production build 0.71.5 2024