Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Products Fixtures generation Error: The entity ID field for the "catalog_data_exporter_products_cl" table wasn't found. #26

Closed
lucafuser opened this issue Feb 28, 2024 · 3 comments

Comments

@lucafuser
Copy link

Both simple products and configurable products fixtures generation goes on error during CLI command : The entity ID field for the catalog_data_exporter_products_cl table wasn't found. Verify the field and try again.

Preconditions (*)

  1. Vanilla Magento Enterprise on Prem. 2.4.6-p4
  2. Catalog Service module installed
    composer require magento/catalog-service=^3.0.1

Steps to reproduce (*)

  1. Run CLI command setup:perf:generate-fixtures with existing profile file path:
    bin/magento setup:perf:generate-fixtures setup/performance-toolkit/profiles/ee/medium.xml

Expected result (*)

  1. For simple products: Generating simple products... done
    For configurable products: Generating configurable products... done

Actual result (*)

  1. For simple products: Generating simple products... The entity ID field for the "catalog_data_exporter_products_cl" table wasn't found. Verify the field and try again.
    For configurable products: Generating configurable products... The entity ID field for the "catalog_data_exporter_products_cl" table wasn't found. Verify the field and try again.
@sofia-doofinder
Copy link

hello @lucafuser did you find any way to avoid this error?

Thank you

@lucafuser
Copy link
Author

Hi @sofia-doofinder on 2.4.6-p4 EE, one year ago I applied this workaround to skip _cl tables:

diff --git a/setup/src/Magento/Setup/Model/FixtureGenerator/SqlCollector.php b/setup/src/Magento/Setup/Model/FixtureGenerator/SqlCollector.php
--- a/setup/src/Magento/Setup/Model/FixtureGenerator/SqlCollector.php	
+++ b/setup/src/Magento/Setup/Model/FixtureGenerator/SqlCollector.php
@@ -96,7 +96,16 @@
      */
     public function getSql()
     {
-        return $this->sql;
+        $result = $this->sql;
+
+        try {
+            return array_filter($result, static function ($item) {
+                return !str_ends_with($item[1], '_cl');
+            });
+        } catch (\Throwable $e) {
+            return $result;
+        }
+
     }
 
     /**

@duhon
Copy link
Contributor

duhon commented Feb 14, 2025

Hello @lucafuser, apologies for the delay.

This is an issue I already fixed here in 2023, but for reasons unknown to me, the fix is not fully effective. As a result, an internal task was created for the performance generator developers. In this repository, we cannot resolve this issue any further than what has already been done.

@duhon duhon closed this as not planned Won't fix, can't repro, duplicate, stale Feb 14, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants