Error installing site from configuration: Field commerce_remote_id is unknown.

Created on 15 February 2024, 11 months ago

Problem/Motivation

When I install my site using drush site:install using the existing configuration, there appears the following error: Field commerce_remote_id is unknown.

After debugging and using git bisect, I've seen that:

- The problem is produced when the admin user is being created, at that moment the field definition of commerce_remote_id is present but is not found in the entity.
- ProductVariationContext class produces the problem after this commit.

When there is a sample entity generated, if it is created with layout builder sample entity generator class. By creating the entity without sample entity generator the problem does not occur.

I still don't understand why it produces the problem as it should not be related to the commerce_remote_id field.

Steps to reproduce

  1. Have a site with commerce_remote_id field installed through commerce_payment module
  2. Install the site from existing configuration: drush site:install --existing config

Proposed resolution

TBD

🐛 Bug report
Status

Active

Version

2.0

Component

Payment

Created by

🇪🇸Spain omarlopesino

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

Comments & Activities

  • Issue created by @omarlopesino
  • Status changed to Postponed: needs info 9 months ago
  • 🇭🇺Hungary czigor

    We see this issue as well when running our tests on a site and it breaks our CI. However, I was not able to reproduce this on a minimal drupal install (where only commerce_payment_example was enabled).

    @omarlopesino Do you know what the other modules or config is required to see this?

  • 🇭🇺Hungary czigor

    Adding

        $this->userStorage->resetCache();
    

    before

        $account = $this->userStorage->load(1);
        $account->init = $account->mail = $account_values['mail'];
    

    in \Drupal\Core\Installer\Form\SiteConfigureForm::submitForm() makes the issue go away.

    Wondering whether this is a Drupal core issue.

  • Status changed to Closed: cannot reproduce about 2 months ago
  • 🇪🇸Spain omarlopesino

    I can not reproduce this problem anymore using drupal core 10.3.6 and commerce 2.40. So the problem may have been fixed along with the latest updates. Closing.

Production build 0.71.5 2024