Bobcares

Magento catalog_product_super_link table doesn’t exist: Solve

by | May 27, 2023

Let us learn how to resolve the Magento catalog_product_super_link table doesn’t exist with the support of our Magento support services at Bobcares.

Error: Magento catalog_product_super_link table doesn’t exist

Magento catalog_product_super_link table doesn't exist

When using Magento 2, we may encounter the link table that does not exist error. It happens because some module attempts to create a SQL call with a SQL query including the “catalog_product_super_link” table, which does not exist.

Solution

Magento 2 module Magento_ConfigurableProduct defines this table. Please ensure that it is enabled in app/etc/config.php. If not, enable it by changing 0 to 1 in the appropriate section, for example:

'Magento_ConfigurableProduct' = 1,Copy Code

After that, we have to run the following commands:

bin/magento setup:upgrade
bin/magento setup:di:compile
bin/magento setup:static-content:deployCopy Code

If this does not work, we can construct the table using the following SQL queries (which we can perform in phpMyAdmin):

Attention! Replace “prefix_” and “PREFIX_” with the real Magento 2 database prefix, or just delete them if the prefix is not used for database table names.

CREATE TABLE `prefix_catalog_product_super_link` (
`link_id` int UNSIGNED NOT NULL COMMENT 'Link ID',
`product_id` int UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Product ID',
`parent_id` int UNSIGNED NOT NULL DEFAULT '0' COMMENT 'Parent ID'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb3 COMMENT='Catalog Product Super Link Table';Copy Code
ALTER TABLE `prefix_catalog_product_super_link`
ADD PRIMARY KEY (`link_id`),
ADD UNIQUE KEY `PREFIX_CATALOG_PRODUCT_SUPER_LINK_PRODUCT_ID_PARENT_ID` (`product_id`,`parent_id`),
ADD KEY `PREFIX_CATALOG_PRODUCT_SUPER_LINK_PARENT_ID` (`parent_id`);Copy Code
ALTER TABLE `prefix_catalog_product_super_link`
MODIFY `link_id` int UNSIGNED NOT NULL AUTO_INCREMENT COMMENT 'Link ID';
ALTER TABLE `prefix_catalog_product_super_link`
ADD CONSTRAINT `PREFIX_CAT_PRD_SPR_LNK_PARENT_ID_PREFIX_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`parent_id`) REFERENCES `prefix_catalog_product_entity` (`entity_id`) ON DELETE CASCADE,
ADD CONSTRAINT `PREFIX_CAT_PRD_SPR_LNK_PRD_ID_PREFIX_CAT_PRD_ENTT_ENTT_ID` FOREIGN KEY (`product_id`) REFERENCES `prefix_catalog_product_entity` (`entity_id`) ON DELETE CASCADE;
COMMIT;?Copy Code

[Need assistance with similar queries? We are here to help]

Conclusion

To sum up we have now seen more on the error Magento catalog_product_super_link table doesn’t exists and how to remove it with the support of our tech team.

PREVENT YOUR SERVER FROM CRASHING!

Never again lose customers to poor server speed! Let us help you.

Our server experts will monitor & maintain your server 24/7 so that it remains lightning fast and secure.

GET STARTED

0 Comments

Submit a Comment

Your email address will not be published. Required fields are marked *

Speed issues driving customers away?
We’ve got your back!