emartech/magento2-extension

[M2 2.2.8][v1.4] - API subscriber issue

Closed this issue · 3 comments

nnwk commented

Hi Guys,

We're trying to upgrade our Emarsys Module to 1.4 but we've an issue on these request :
POST /rest/V1/emarsys/subscriptions HTTP/1.1" 500 5807

The following error is :

main.CRITICAL: Report ID: webapi-5ce41fa93c7f1; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'store.website_id' in 'where clause', query was: SELECT `main_table`.*, `shop_store`.`website_id` FROM `shop_newsletter_subscriber` AS `main_table`
 LEFT JOIN `shop_store` ON shop_store.store_id = main_table.store_id WHERE (`subscriber_email` = 'xxxx@mail.com') AND (`customer_id` = 0) AND (`store`.`website_id` IN('1')) {"exception":"[object] (Exception(code: 42): Report ID: webapi-5ce41fa93c7f1; Message: SQLSTATE[42S22]: Column not found: 1054 Unknown column 'store.website_id' in 'where clause', query was: SELECT `main_table`.*, `shop_store`.`website_id` FROM `shop_newsletter_subscriber` AS `main_table`
 LEFT JOIN `shop_store` ON shop_store.store_id = main_table.store_id WHERE (`subscriber_email` = 'xxxx@mail.com') AND (`customer_id` = 0) AND (`store`.`website_id` IN('1')) at /var/www/releases/feed/1075/shop/vendor/magento/framework/Webapi/ErrorProcessor.php:205, Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'store.website_id' in 'where clause', query was: SELECT `main_table`.*, `shop_store`.`website_id` FROM `shop_newsletter_subscriber` AS `main_table`
 LEFT JOIN `shop_store` ON shop_store.store_id = main_table.store_id WHERE (`subscriber_email` = 'xxxx@mail.com') AND (`customer_id` = 0) AND (`store`.`website_id` IN('1')) at /var/www/releases/feed/1075/shop/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 42S22): SQLSTATE[42S22]: Column not found: 1054 Unknown column 'store.website_id' in 'where clause' at /var/www/releases/feed/1075/shop/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

Our env. is :

  • Magento 2 version : 2.2.8
  • Emartech module version : 1.4
  • Prefixed tables : YES with "shop" - eg. shop_store

We think that is missing prefix on subrequest : AND (store.website_id IN('1'))

Any idea ?

Is the module is ready for production ?

Many thanks :)

Nicolas

Hi @nnwk,

Thank You for reporting this issue. We put it on our backlog and hopefully it will be resolved in the next release.

The module is in the piloting phase, we're continuously fixing issues that come up with our client's different Magento setups. Please reach out to your Emarsys contact to arrange your participation in the piloting.

Cheers,
Bence

nnwk commented

Hi @iben12

Thank you for your quick answer :)

Any idea of time for this bug fix ? We asked our CSM to add our participation in the piloting phase.

Kind regards,
Nicolas

New version was released today to support prefixed database tables.

In case of issues, please re-open this.