Closed BenGoos closed 1 year ago
Hi @BenGoos ,
Thank you for submitting this, I will place this on our backlog, so we can fix this issue. Looks like this happens when you use prefix together with Async.
Thank again for submitting this issue.
Have a great day, Jeffrey
Hi @BenGoos,
We have a fix for this and will include it into the next release. If you already want to fix this you can create patches based on the diff:
diff --git a/Plugin/Order/AsyncPlugin.php b/Plugin/Order/AsyncPlugin.php
index 9bd329bf..aa1a2fa7 100644
--- a/Plugin/Order/AsyncPlugin.php
+++ b/Plugin/Order/AsyncPlugin.php
@@ -123,7 +123,8 @@ public function afterRefreshBySchedule()
];
$where = [$connection->quoteIdentifier('entity_id') . '=?' => $orderId];
- $connection->update('sales_order_grid', $binds, $where);
+ $tableName = $connection->getTableName('sales_order_grid');
+ $connection->update($tableName, $binds, $where);
}
}
}
diff --git a/Plugin/Shipment/AsyncPlugin.php b/Plugin/Shipment/AsyncPlugin.php
index 4cb2df17..7b429aaf 100644
--- a/Plugin/Shipment/AsyncPlugin.php
+++ b/Plugin/Shipment/AsyncPlugin.php
@@ -123,7 +123,8 @@ public function afterRefreshBySchedule()
];
$where = [$connection->quoteIdentifier('entity_id') . '=?' => $shipmentId];
- $connection->update('sales_shipment_grid', $binds, $where);
+ $tableName = $connection->getTableName('sales_shipment_grid');
+ $connection->update($tableName, $binds, $where);
}
}
}
Hi @tig-vincentthart,
Thank you for the quick solution. I'll add a patch to our application and update when the release is published.
Kind regards, Ben Goossens
Hi @BenGoos,
We have added the above solution into the latest release, v1.12.7.
Thanks for bringing this issue to our attention.
Greetings,
Vincent
We receive the following error when the database tables have a prefix:
Next Zend_Db_Statement_Exception: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'sales_order_grid' doesn't exist, query was: UPDATE
sales_order_grid
SETtig_postnl_ship_at
= ?,tig_postnl_product_code
= ?,tig_postnl_confirmed
= ? WHERE (entity_id
='294026') in /vendor/magento/framework/DB/Statement/Pdo/Mysql.php:109