When using Smart Importer when the tables in the database having a prefix (hosting service required it), it can not find the commerce_store_field_data table.
Clicking either on Configure or "I have CVS File for import" creates the following page error: The website encountered an unexpected error. Please try again later.
The log error indicates the following:
1603 20/Jul 18:53 php Error Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table
'db787516814.commerce_store_field_data' doesn't exist: SELECT store_id, name FROM c
Created the same table without the prefix, works like a charm. How will it effect the import if the one table doesn't have a prefix but the others do.
Comments
Comment #2
paultgreen CreditAttribution: paultgreen commentedI think this is the same error I'm having. Is there any way to work around it without having to change table names?
Drupal\Core\Database\DatabaseExceptionWrapper: SQLSTATE[42S02]: Base table or view not found: 1146 Table 'ssr_.commerce_store_field_data' doesn't exist: SELECT store_id, name FROM commerce_store_field_data; Array ( ) in Drupal\commerce_smart_importer\Form\SmartImporterConfigurationForm->buildForm() (line 92 of /var/www/vhosts/mysite/httpdocs/modules/commerce_smart_importer/src/Form/SmartImporterConfigurationForm.php).
Comment #3
Massimo25 CreditAttribution: Massimo25 as a volunteer commentedGood morning,
I have the same error reported above when I go to configuration or in the entry I have a CSV I get the error page, actually the site where it is installed has a prefix to the tables in the database because on the database status there are three tables Drupal sites therefore I can not remove the prefix to the tables, kindly how can I solve the problem, otherwise the module is unusable.
In practice the error occurs every time the module is installed on a site where the tables in the database have a prefix, now to avoid changing or removing the prefix to the commerce_store_field_data table in the database, I corrected the fields in the files in question in the commerce_smart_importer \ src \ Form folder by removing the prefix where the database table was called except where it was a field and not the database table, at least from the graphical aspect it seems to work perfectly, another solution would have been to remove the prefix to the commerce_store_field_data table however this surely would have created problems as the tables of that site all have a prefix while correcting the call from the module files does not affect anything else, obviously the import of the products is still to be tested but I doubt that there can be problems.
Comment #4
Massimo25 CreditAttribution: Massimo25 as a volunteer commentedComment #5
Massimo25 CreditAttribution: Massimo25 as a volunteer commentedComment #6
Massimo25 CreditAttribution: Massimo25 as a volunteer commentedComment #8
DavorHorvacki CreditAttribution: DavorHorvacki at Studio Present commentedThanks for reporting, I would be very thankful in case you can test it for me
Comment #9
allisonc CreditAttribution: allisonc as a volunteer commented/src/Form/SmartImporterConfigurationForm.php:92
Code should be changed to:
or