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 {} \;
Rakesh Donga
5,4442 gold badges26 silver badges58 bronze badges
asked Jan 18, 2019 at 12:22
5
  • looks like you should contact them since this is a paid extension. Commented Jan 18, 2019 at 12:23
  • @Marius My support is expired :( Commented Jan 18, 2019 at 12:23
  • @Marius After removing extension why I get this error I dont know. could you help me please Commented Jan 18, 2019 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 Commented Jan 18, 2019 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! Commented Jan 18, 2019 at 12:44

2 Answers 2

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"
Rama Chandran M
3,26515 gold badges24 silver badges38 bronze badges
answered Jan 18, 2019 at 18:08
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)

answered Jan 18, 2019 at 12:51
1
  • Yes, I have already installed it using composer. Commented Jan 18, 2019 at 13:27

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.