promatik Posted June 13, 2016 Share Posted June 13, 2016 (edited) My store has a bug, when I share a link with a sub-category selected like:http://goodafter.com/21-mercearia#/categorias-pequeno_almoco The subcategory disappear, and the url turns to: http://goodafter.com/21-mercearia# After an extensive debug I found the problem comes from an empty table ps_layered_friendly_url. The call is in the file blocklayered.php, function getSelectedFilters(). Is there any way to rebuild this table? I don't know what happened here, I don't believe I've truncated it. Edited June 15, 2016 by promatik (see edit history) Link to comment Share on other sites More sharing options...
rocky Posted June 14, 2016 Share Posted June 14, 2016 Have you tried clicking the "Build URL index" button on the configuration page of the "Layered Navigation block"? If that doesn't work, I guess you'll have to reset the module and then reconfigure it again. 1 Link to comment Share on other sites More sharing options...
promatik Posted June 14, 2016 Author Share Posted June 14, 2016 Thanks! That's exactly what I wanted. It's everything working now. Link to comment Share on other sites More sharing options...
rocky Posted June 15, 2016 Share Posted June 15, 2016 I'm happy it was that simple to fix. Please edit your first post and add [sOLVED] to the front of the title. 1 Link to comment Share on other sites More sharing options...
Klemart3D Posted August 22, 2016 Share Posted August 22, 2016 (edited) Same problem but I found another solution : Problem : Table 'database.ps_layered_friendly_url' doesn't exist Table 'database.ps_layered_product_attribute' doesn't exist [PrestaShopDatabaseException]Table 'database.ps_layered_friendly_url' doesn't exist SELECT data FROM `ps_layered_friendly_url` WHERE `url_key` = '1196b52362647d9d04cc81eb54e5d50b' LIMIT 1at 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. /** DbCore->displayError - [line 340 - classes/db/Db.php] - [1 Arguments] DbCore->query - [line 558 - classes/db/Db.php] - [1 Arguments] DbCore->getRow - [line 583 - classes/db/Db.php] - [2 Arguments] DbCore->getValue - [line 1721 - modules/blocklayered/blocklayered.php] - [1 Arguments] BlockLayered->getSelectedFilters - [line 687 - modules/blocklayered/blocklayered.php] BlockLayered->hookHeader - [line 512 - classes/Hook.php] - [1 Arguments] HookCore::exec - [line 456 - classes/controller/FrontController.php] - [1 Arguments] FrontControllerCore->initContent - [line 104 - controllers/front/CategoryController.php] CategoryControllerCore->initContent - [line 180 - classes/controller/Controller.php] ControllerCore->run - [line 373 - classes/Dispatcher.php] DispatcherCore->dispatch - [line 28 - index.php] Solution : 1. Connect to MySQL :mysql database -u root -p 2. Check if tables are in MySQL index :SHOW TABLES;> … | ps_layered_friendly_url | ps_layered_product_attribute | … 3. Check tables doesn't exists :select * from ps_layered_friendly_url;select * from ps_layered_product_attribute;> ERROR 1146 (42S02): Table 'database.ps_layered_friendly_url' doesn't exist> ERROR 1146 (42S02): Table 'database.ps_layered_product_attribute' doesn't exist 4. Create an SQL file containing sql requests (create + complete) of this 2 tables from the last valid SQL dump 5. Upload this file on server and add it to database (and check again if tables exists) :mysql database -u root -p < /tmp/fichier.sql 6. If ok, in Prestashop, go to :MODULES > BLOCKLAYERED > SETTINGS > Index all tabs If 4 tabs are indexed without errors, it's the right way, check your website, you mustn't find any error ! Edited August 22, 2016 by Klemart3D (see edit history) 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