Jump to content

PrestaShopDatabaseException after Server Migration / ERROR


Recommended Posts

Hello - I have just migrated my whole PS installation to another host, Bluehost, and cannot get PS to work.
 
I have tried everything I can think of such as removing .htaccess, importing mysql database again, clearing caches etc. 
 
The problem is it doesn't see PS themes. I have activated PS_MODE_DEV for you to see the error code. Please visit the website link http://www.take-5-coffee.com/
 
The problem is we are getting 500 Server Error after migration and you will see the error code after visit the site. Also, as I mention above, I have cleared caches, removed htaccess and regenerate it, changed setting.inc.php, shop_url s are correct, base url is correct " / ". 
 
I can log in to BackOffice but can't go to Preferences > Themes tab. It gives blank page.
 
Error looks like this:  Thank you kindly for any advice, tips, fixes, solutions!
 
[PrestaShopDatabaseException]

Table 'takefivc_last.ps_theme' doesn't exist
 

            SELECT su.physical_uri, su.virtual_uri, su.domain, su.domain_ssl, t.id_theme, t.name, t.directory
            FROM ps_shop s
            LEFT JOIN ps_shop_url su ON (s.id_shop = su.id_shop)
            LEFT JOIN ps_theme t ON (t.id_theme = s.id_theme)
            WHERE s.id_shop = 1
            AND s.active = 1 AND s.deleted = 0 AND su.main = 1 LIMIT 1

at line 646 in file classes/db/Db.php

 

641.             WebserviceRequest::getInstance()->setError(500, '
 '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
642.         }
643.         elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS'))
644.         {
645.             if ($sql)
646.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
647.             throw new PrestaShopDatabaseException($this->getMsgError());
648.         }
649.     }
650.
651.     /**

 

Link to comment
Share on other sites

Sorry It is my fault that I've missed this. You're right.

 

There is ps_theme table in old database and I've exported the database again and imported it to the new server and the website is back.

 

Thanks so much for your kind assistance. Problem solved.

  • Like 1
Link to comment
Share on other sites

  • 4 months later...

I have this exact same problem, but after searching and searching I cannot find a table regarding the theme on the old server. What am I missing? Below is a list of all the tables on the old server that currently works:

 

·         access

·         accessory

·         address

·         address_format

·         advice

·         advice_lang

·         alias

·         attachment

·         attachment_lang

·         attribute

·         attribute_group

·         attribute_group_lang

·         attribute_group_shop

·         attribute_impact

·         attribute_lang

·         attribute_shop

·         badge

·         badge_lang

·         carrier

·         carrier_group

·         carrier_lang

·         carrier_shop

·         carrier_tax_rules_group_shop

·         carrier_zone

·         cart

·         cart_cart_rule

·         cart_product

·         cart_rule

·         cart_rule_carrier

·         cart_rule_combination

·         cart_rule_country

·         cart_rule_group

·         cart_rule_lang

·         cart_rule_product_rule

·         cart_rule_product_rule_group

·         cart_rule_product_rule_value

·         cart_rule_shop

·         category

·         category_group

·         category_lang

·         category_product

·         category_shop

·         cms

·         cms_block

·         cms_block_lang

·         cms_block_page

·         cms_block_shop

·         cms_category

·         cms_category_lang

·         cms_category_shop

·         cms_lang

·         cms_role

·         cms_role_lang

·         cms_shop

·         compare

·         compare_product

·         condition

·         condition_advice

·         condition_badge

·         configuration

·         configuration_kpi

·         configuration_kpi_lang

·         configuration_lang

·         connections

·         connections_page

·         connections_source

·         contact

·         contact_lang

·         contact_shop

·         country

·         country_lang

·         country_shop

·         cronjobs

·         ctk_ld_countries

·         ctk_ld_infobar

·         ctk_ld_infobar_countries

·         ctk_ld_infobar_lang

·         ctk_ld_redirect

·         ctk_ld_redirect_countries

·         currency

·         currency_shop

·         customer

·         customer_group

·         customer_message

·         customer_message_sync_imap

·         customer_thread

·         customization

·         customization_field

·         customization_field_lang

·         customized_data

·         date_range

·         delivery

·         employee

·         employee_shop

·         feature

·         feature_lang

·         feature_product

·         feature_shop

·         feature_value

·         feature_value_lang

·         gender

·         gender_lang

·         group

·         group_lang

·         group_reduction

·         group_shop

·         guest

·         homeslider

·         homeslider_slides

·         homeslider_slides_lang

·         hook

·         hook_alias

·         hook_module

·         hook_module_exceptions

·         image

·         image_lang

·         image_shop

·         image_type

·         import_match

·         info

·         info_lang

·         lang

·         lang_shop

·         layered_category

·         layered_filter

·         layered_filter_shop

·         layered_friendly_url

·         layered_indexable_attribute_group

·         layered_indexable_attribute_group_lang_value

·         layered_indexable_attribute_lang_value

·         layered_indexable_feature

·         layered_indexable_feature_lang_value

·         layered_indexable_feature_value_lang_value

·         layered_price_index

·         layered_product_attribute

·         lgfreeshippingzones

·         linksmenutop

·         linksmenutop_lang

·         log

·         mail

·         mailalert_customer_oos

·         manufacturer

·         manufacturer_lang

·         manufacturer_shop

·         memcached_servers

·         message

·         message_readed

·         meta

·         meta_lang

·         module

·         modules_perfs

·         module_access

·         module_country

·         module_currency

·         module_group

·         module_preference

·         module_shop

·         newsletter

·         opc_field

·         opc_field_cart

·         opc_field_lang

·         opc_field_option

·         opc_field_option_lang

·         opc_field_shop

·         opc_payment

·         opc_payment_lang

·         opc_payment_shop

·         opc_ship_to_pay

·         opc_social_customer

·         operating_system

·         orders

·         order_carrier

·         order_cart_rule

·         order_detail

·         order_detail_tax

·         order_history

·         order_invoice

·         order_invoice_payment

·         order_invoice_tax

·         order_message

·         order_message_lang

·         order_payment

·         order_return

·         order_return_detail

·         order_return_state

·         order_return_state_lang

·         order_slip

·         order_slip_detail

·         order_slip_detail_tax

·         order_state

·         order_state_lang

·         pack

·         page

·         pagenotfound

·         page_type

·         page_viewed

·         paypal_usa_transaction

·         product

·         product_attachment

·         product_attribute

·         product_attribute_combination

·         product_attribute_image

·         product_attribute_shop

·         product_carrier

·         product_comment

·         product_comment_criterion

·         product_comment_criterion_category

·         product_comment_criterion_lang

·         product_comment_criterion_product

·         product_comment_grade

·         product_comment_report

·         product_comment_usefulness

·         product_country_tax

·         product_download

·         product_group_reduction_cache

·         product_lang

·         product_sale

·         product_shop

·         product_supplier

·         product_tag

·         profile

·         profile_lang

·         quick_access

·         quick_access_lang

·         range_price

·         range_weight

·         referrer

·         referrer_cache

·         referrer_shop

·         request_sql

·         required_field

·         risk

·         risk_lang

·         scene

·         scene_category

·         scene_lang

·         scene_products

·         scene_shop

·         sdc_cache

·         sdc_carrier

·         sdc_order_information

·         search_engine

·         search_index

·         search_word

·         sekeyword

·         sendin_newsletter

·         shop

·         shop_group

·         shop_url

 

·         sliderseverywhere

Link to comment
Share on other sites

  • 3 years later...

Hi there, I have the exact same problem after I performed a mass update on the Base prices of all my products.

I tried to update the prices by importing a CSV file of this form:

ID; Base Price
1; 100.0
2; 210.0

The prices are updated fine, but when I try to test the checkout, I get nothing! My clients cannot check out. So I had to turn the debug mode on:

I run a prestashop 1.7.2.4
My URL is https:polymerclay.gr
I will now revert to an older version of my eshop in order to allow clients to buy with the old prices, but if you have any idea about the error, I would apreciate it.

This is the error message (on debug mode) :

 

[PrestaShopDatabaseException]

Table 'eshop.eshop_opc_ship_to_pay' doesn't exist
 

SELECT * FROM eshop_opc_ship_to_pay


at line 744 in file classes/db/Db.php

 

739.         if ($webservice_call && $errno) {
740.             $dbg = debug_backtrace();
741.             WebserviceRequest::getInstance()->setError(500, '[SQL Error] '.$this->getMsgError().'. From '.(isset($dbg[3]['class']) ? $dbg[3]['class'] : '').'->'.$dbg[3]['function'].'() Query was : '.$sql, 97);
742.         } elseif (_PS_DEBUG_SQL_ && $errno && !defined('PS_INSTALLATION_IN_PROGRESS')) {
743.             if ($sql) {
744.                 throw new PrestaShopDatabaseException($this->getMsgError().'<br /><br /><pre>'.$sql.'</pre>');
745.             }
746. 
747.             throw new PrestaShopDatabaseException($this->getMsgError());
748.         }
749.     }

 

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...