ccw0103 Posted November 3, 2015 Share Posted November 3, 2015 Hello I recently tried to copy my live site to localhost for development testing, but when I try to find the table ps_shop_url, it doesn't exist in both my working "live" database and backed up database, what should I do to fix it? Link to comment Share on other sites More sharing options...
Guest Posted November 3, 2015 Share Posted November 3, 2015 (edited) It should be present but empty without multistore. If you are running multistore something really bad happened. edit: not sure this is true though lol Edited November 4, 2015 by Guest (see edit history) Link to comment Share on other sites More sharing options...
bellini13 Posted November 3, 2015 Share Posted November 3, 2015 why are you trying to find or update it directly in the database? log into your back office on your localhost and then change the domain information in SEO & URL. Link to comment Share on other sites More sharing options...
Guest Posted November 3, 2015 Share Posted November 3, 2015 why are you trying to find or update it directly in the database? log into your back office on your localhost and then change the domain information in SEO & URL. Is it created on save? If yes would have been nice to include that info. Link to comment Share on other sites More sharing options...
bellini13 Posted November 3, 2015 Share Posted November 3, 2015 Is it created on save? If yes would have been nice to include that info. I'm not going to guess what information is saved or not on the various versions of Prestashop. My suggestion is to use the back office to make the necessary changes and let Prestashop software worry about what is saved in the database. Link to comment Share on other sites More sharing options...
Guest Posted November 3, 2015 Share Posted November 3, 2015 I'm not going to guess what information is saved or not on the various versions of Prestashop. My suggestion is to use the back office to make the necessary changes and let Prestashop software worry about what is saved in the database. agreed! this is a non-breaking issue so until it breaks, leave it alone Link to comment Share on other sites More sharing options...
ccw0103 Posted November 4, 2015 Author Share Posted November 4, 2015 It should be present but empty without multistore. If you are running multistore something really bad happened. Hello, I am not using multi store and I was trying to amend the store url to localhost, I can't access my site in local host (front+back end). my live website is totally fine...... Link to comment Share on other sites More sharing options...
ccw0103 Posted November 4, 2015 Author Share Posted November 4, 2015 basically I am cloning my live website to local host....and I can't get it to work. I have done: 1. Copy live website from FTP to local environment 2. Export live database 3. Import database to localhost 4. amend url, database name, id, password in folder CONFIG/defines.inc to local host tried to access in local host, then error: Table 'localhost.ps_shop_url' doesn't exist SELECT s.id_shop, CONCAT(su.physical_uri, su.virtual_uri) AS uri, su.domain, su.main FROM ps_shop_url su LEFT JOIN ps_shop s ON (s.id_shop = su.id_shop) WHERE (su.domain = 'localhost:8888' OR su.domain_ssl = 'localhost:8888') AND s.active = 1 AND s.deleted = 0 ORDER BY LENGTH(CONCAT(su.physical_uri, su.virtual_uri)) DESC Link to comment Share on other sites More sharing options...
Guest Posted November 4, 2015 Share Posted November 4, 2015 (edited) Then my first statement is incorrect, apparently it does need a row (it's all guesswork) Let's try a manual fix by adding it in the database, add the correct values for your shop on localhost: physicial uri is the path below your root; virtual_uri can be empty; main = 1; active = 1 I fixed missing tables like this before, compare to a clean install to be sure. CREATE TABLE IF NOT EXISTS `ps_shop_url` ( `id_shop_url` int(11) unsigned NOT NULL AUTO_INCREMENT, `id_shop` int(11) unsigned NOT NULL, `domain` varchar(150) NOT NULL, `domain_ssl` varchar(150) NOT NULL, `physical_uri` varchar(64) NOT NULL, `virtual_uri` varchar(64) NOT NULL, `main` tinyint(1) NOT NULL, `active` tinyint(1) NOT NULL, PRIMARY KEY (`id_shop_url`), UNIQUE KEY `full_shop_url` (`domain`,`physical_uri`,`virtual_uri`), UNIQUE KEY `full_shop_url_ssl` (`domain_ssl`,`physical_uri`,`virtual_uri`), KEY `id_shop` (`id_shop`,`main`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Edited November 4, 2015 by Guest (see edit history) Link to comment Share on other sites More sharing options...
ccw0103 Posted November 4, 2015 Author Share Posted November 4, 2015 Then my first statement is incorrect, apparently it does need a row (it's all guesswork) Let's try a manual fix by adding it in the database, add the correct values for your shop on localhost: physicial uri is the path below your root; virtual_uri can be empty; main = 1; active = 1 I fixed missing tables like this before, compare to a clean install to be sure. CREATE TABLE IF NOT EXISTS `ps_shop_url` ( `id_shop_url` int(11) unsigned NOT NULL AUTO_INCREMENT, `id_shop` int(11) unsigned NOT NULL, `domain` varchar(150) NOT NULL, `domain_ssl` varchar(150) NOT NULL, `physical_uri` varchar(64) NOT NULL, `virtual_uri` varchar(64) NOT NULL, `main` tinyint(1) NOT NULL, `active` tinyint(1) NOT NULL, PRIMARY KEY (`id_shop_url`), UNIQUE KEY `full_shop_url` (`domain`,`physical_uri`,`virtual_uri`), UNIQUE KEY `full_shop_url_ssl` (`domain_ssl`,`physical_uri`,`virtual_uri`), KEY `id_shop` (`id_shop`,`main`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; Hello, really thanks for the help, but may I know how to add this? Is there somewhere in myphp to enter this? Link to comment Share on other sites More sharing options...
bellini13 Posted November 4, 2015 Share Posted November 4, 2015 Yes, there is a section named SQL But this is very different now. Now you are saying that there is a database table named ps_shop_url that exists in your live store but not in your localhost. This means that your export from your live production database did not include all the tables. you should look into that and resolve it... who knows what other data is missing... Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now