2

I am getting below error while saving category. This error are from log file.

[2019-01-18 12:03:51] main.CRITICAL: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'a76e6b4a_demo.amasty_xsearch_category_fulltext_cl' doesn't exist, query was: INSERT INTO catalog_category_entity_varchar (entity_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE entity_id = VALUES(entity_id), attribute_id = VALUES(attribute_id), store_id = VALUES(store_id), value = VALUES(value) {"exception":"[object] (Zend_Db_Statement_Exception(code: 42): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'a76e6b4a_demo.amasty_xsearch_category_fulltext_cl' doesn't exist, query was: INSERT INTO catalog_category_entity_varchar (entity_id,attribute_id,store_id,value) VALUES (?, ?, ?, ?) ON DUPLICATE KEY UPDATE entity_id = VALUES(entity_id), attribute_id = VALUES(attribute_id), store_id = VALUES(store_id), value = VALUES(value) at

/chroot/home/a76e6b4a/buildersbook.com/html/demo/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:235, PDOException(code: 42S02): SQLSTATE[42S02]: Base table or view not found: 1146 Table 'a76e6b4a_demo.amasty_xsearch_category_fulltext_cl' doesn't exist at /chroot/home/a76e6b4a/buildersbook.com/html/demo/vendor/magento/zendframework1/library/Zend/Db/Statement/Pdo.php:228)"} []

I have installed Amasty Xsearch extension before which I already removed and have been executed below commands too.

rm -rf var/cache/ var/page_cache/ var/view_preprocessed/ pub/static/frontend/ pub/static/adminhtml/
php -dmemory_limit=8G bin/magento cache:clean
php -dmemory_limit=8G bin/magento cache:flush
php -dmemory_limit=8G bin/magento setup:upgrade
php -dmemory_limit=8G bin/magento setup:di:compile
php -dmemory_limit=8G bin/magento indexer:reset
php -dmemory_limit=8G bin/magento indexer:reindex
php -dmemory_limit=8G bin/magento setup:static-content:deploy -f

I also give below permissions to my files and folders:

find . -type f -exec chmod 644 {} \;
find . -type d -exec chmod 755 {} \;
find ./var -type d -exec chmod 777 {} \;
find ./pub/media -type d -exec chmod 777 {} \;
find ./pub/static -type d -exec chmod 777 {} \;
  • looks like you should contact them since this is a paid extension. – Marius Jan 18 at 12:23
  • @Marius My support is expired :( – Jaimin Jan 18 at 12:23
  • @Marius After removing extension why I get this error I dont know. could you help me please – Jaimin Jan 18 at 12:24
  • maybe there is a trigger that remained on the catalog_category_entity_varchar from that extension: mysqltutorial.org/managing-trigger-in-mysql.aspx – Marius Jan 18 at 12:44
  • 1
    Amasty isn't that tight with support periods (in our case). Just give it a try contacting them. Very nice folks over there! – Koen Jan 18 at 12:44
2

You have added prefix to your database tables 'a76e6b4a_demo' and in Amasty module table name is written statically so it is throwing an error. You can use below code for table names:

$resource is an object of Magento\Framework\App\ResourceConnection

$this->_resource = $resource; 

$connection=$this->_resource->getConnection(); 

$tableName=$connection->getTableName(YOUR_TABLENAME); // It will return "TablePrefix_YOUR_TABLENAME"
0

Maybe you didnt installed the Amasty Extension properly. Are you installing it through composer ? If so check if your version is community / enterprise .

Do a composer remove of the current one

composer remove amasty/xsearch --clear-static-content 

(check if it has dependencies)

  • Yes, I have already installed it using composer. – Jaimin Jan 18 at 13:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.