EmicoEcommerce / Magento2TweakwiseExport-archived

Magento 2 module for Tweakwise export
Other
6 stars 16 forks source link

Column not found: 1054 Unknown column 'attribute_table.row_id' in 'on clause' #2

Closed mdubbelman closed 7 years ago

mdubbelman commented 7 years ago

Issue Brief Error in fix #1 [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'attribute_table.row_id' in 'on clause'

Environment

Steps to reproduce

  1. Install Magento
  2. Install Tweakwise modules
  3. Run the export

Actual result

  1. Console shows a SQL error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'attribute_table.row_id' in 'on clause'

Expected result

Tweakwise feed generated succesfully

I think there is an error in your fix #1 : In vendor/emico/tweakwise-export/src/Model/Write/EavIterator.php:247 you are checking the edition of the productMetadata. But you are comparing it to CommunityProductMetadata::PRODUCT_NAME and not CommunityProductMetadata::EDITION_NAME. I think it should be: } elseif ($this->productMetadata->getEdition() == CommunityProductMetadata::EDITION_NAME) { Because now it will never match the community edition (which we are running) and will always perform getAttributeSelectEnterprise() which results in an SQL error: [PDOException] SQLSTATE[42S22]: Column not found: 1054 Unknown column 'attribute_table.row_id' in 'on clause'

Fgruntjes commented 7 years ago

Hello,

Thank you for the issue report. You where 100% right. We where a bit to fast with our fix from #1. Now changed to the suggested code.

P.s. A pull request would also have been ok for us.