system.action configs have wrong dependency to domain

Created on 17 December 2022, almost 2 years ago
Updated 17 January 2023, almost 2 years ago

Actual Behavior

Hello, whenever I create a new domain record, the system.action config files have dependency on config.DOMAIN_NAME, which doesn't exist. I need to manually change them to domain.record.DOMAIN_NAME to make them work. Any ideas?

Thanks

🐛 Bug report
Status

Active

Version

1.0

Component

Code

Created by

🇨🇿Czech Republic honyik

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.

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    Sorry for the late respone. The config name is not the problem, those are created as you say domain_access_add_action.<ID>
    the problem is within the dependencies of the config.

    status: true
    dependencies:
      config:
        - config.<ID>
      module:
        - domain_access
    id: domain_access_add_action.<ID>
    label: 'Add selected content to the <LABEL> domain'
    type: node
    plugin: domain_access_add_action
    configuration:
      domain_id: <ID>
    

    Still not able to pinpoint where the problem is

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    Problem does not exist in website installed with Drupal 9.5.2 and domain + domain_access 1.0.0-beta6
    Problem exists in website installed with Drupal 9.5.2 and domain + domain_access 1.x-dev

    So there must be some change between the 1.0.0-beta6 and the current dev branch.

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    Thanks @agentrickard to point me in the correct direction.
    I found the commit that changed the behaviour of the actions config.

    In version 8.x-1.0-beta6 the config dependencies are calculated and the config prefix was domain.record
    In version 8.x-1.x the config dependencies are calculated with a different method and the config prefix is config

    Changing the code back to getConfigPrefix gives the correct config dependency.

  • @tim-diels opened merge request.
  • Status changed to Needs review almost 2 years ago
  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    Created a MR with the needed code change.

  • 🇺🇸United States agentrickard Georgia (US)

    Looks good. Running tests against 10.x.

    I wonder why we made this change -- did you find the original issue or just the commit?

  • 🇧🇪Belgium tim-diels Belgium 🇧🇪

    I found the corresponding issue for the commit. The commit references to MR19 and that points to #3283843: Run drupal check and fix issues

  • Status changed to RTBC almost 2 years ago
  • 🇮🇳India Anjali Rathod

    Applied the patch

    1. Created a new domain.
    2. Exported the configurations.
    3. The system.action files were found having correct config name, under dependencies.

    Hence, marking it as RTBC.
    Thanks @tim-diels

  • Status changed to Fixed almost 2 years ago
  • 🇺🇸United States agentrickard Georgia (US)

    Thanks all! I will do a beta release this week.

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

  • Status changed to Fixed over 1 year ago
  • 🇫🇷France benjbmc

    I tested the patch on D10.0.2 with Domain 2.0.x-dev, it's OK for me too. Thanks @tim-diels !

    Steps:

    1. Add patch to composer = https://git.drupalcode.org/project/domain/-/merge_requests/32.patch
    2. Apply the patch
    3. Remove and recreate the existing domain in backend
    4. Export config
    5. The config files system.action.domain_access_*.yml have updated dependencies, and the import is done correctly
  • Hey all,

    This problem still persist (on version 2.0.0beta 2).
    The patch correction is already added on this version, but the YML still don't have "domain_id".

    When I export my YML is like this:

    dependencies:
      config:
        - domain.record.

    after ".record." should be domain ID as it mention on this post.

    Any idea about it?

    Thanks in advance.

Production build 0.71.5 2024