ubv Posted March 7, 2017 Share Posted March 7, 2017 There are several problems with the Link Widget module in 1.7, it's just not working properly, too many errors to mention here in detail, but involving the second language customer content and titles in second languages, as well as all the pages being listed 4 times! One problem is very acute however. I added a new Link Block and it didn't appear in the back office. However it did appear in the front office, and now I can't delete or edit it, because I can't see it in the back office. I have deleted the cache, and also tried removing the widget from the hook and reattaching it, but the error persists. I'm not sure how to go about deleting/editing the content. Can anyone help, or has anyone had the same problem? Thanks! Link to comment Share on other sites More sharing options...
rocky Posted March 8, 2017 Share Posted March 8, 2017 Check the ps_link_block, ps_link_block_lang and ps_link_block_shop tables in your database using phpMyAdmin. Hopefully, you can manually delete the block from there. Link to comment Share on other sites More sharing options...
ubv Posted March 8, 2017 Author Share Posted March 8, 2017 Thanks, we finally managed to get rid of it by uninstalling and installing the module again. Good to know that's it's possible using phpMyadmin though, we might have to use it when the module breaks again, which is probable, based on our experience so far. 1.7 was not ready for release at all! Every day we come across new problems. 2 Link to comment Share on other sites More sharing options...
Reho Posted December 4, 2017 Share Posted December 4, 2017 I've done some modifications in LinkBlockRepository.php getIdByHook function: public function getByIdHook($id_hook, $id_shop = null) { $id_hook = (int) $id_hook; $id_shop = (int) (($id_shop) ?: Context::getContext()->shop->id); $sql = "SELECT cb.`id_link_block` FROM {$this->db_prefix}link_block cb LEFT JOIN {$this->db_prefix}link_block_shop lbs ON lbs.id_link_block = cb.id_link_block WHERE `id_hook` = $id_hook AND lbs.`id_shop` = $id_shop ORDER by cb.`position` "; $ids = $this->db->executeS($sql); $cmsBlock = array(); foreach ($ids as $id) { $cmsBlock[] = new LinkBlock((int)$id['id_link_block']); } return $cmsBlock; } It doesn't solves the admin part but the prublic pages shows up in correct store. You shoud edit the blocks using phpmyadmin until final upgrade arrives. Link to comment Share on other sites More sharing options...
sro1234 Posted January 17, 2018 Share Posted January 17, 2018 Thanks Reho. Using that prevents in my case same page showing up 3 times in the bloc (I have 3 stores). However, only one of the shop shows the page : the one I last clicked on save. Selecting the proper store context doesn't help. Only one shows the links : the last saved. I tried looking in the tables (CMS, Link_block...) but all seems ok. I don't know what to change to get each page appearing in its own store link block ... Thanks Link to comment Share on other sites More sharing options...
mmsayeed Posted March 27, 2018 Share Posted March 27, 2018 Hello, I am newbie here. In my multi-store the link widget is not working as expected. I can not set different links for different store. It is showing the same url for both store. Can you help please ? Link to comment Share on other sites More sharing options...
sro1234 Posted March 28, 2018 Share Posted March 28, 2018 This is just one of the many issues you will encounter with Multistore. To make it short, Multistore is a big joke : it does not work at all. We have stopped struggling with unwanted merges of our stores and created many standalone stores... Link to comment Share on other sites More sharing options...
Alejandro del Valle Posted March 29, 2018 Share Posted March 29, 2018 Hi everyone i have a solution for link widget, isn´t completely finished, because still missing that one block can be attached to more than one store. Solution - First you have to copy de file LinkBlockRepository.php into directory /modules/ps_linklist/src/ and replace it, is the same file, only i made a few changes. - Second you have to execute the sql sentence INSERT INTO `PREFIX_link_block_shop` (`id_link_block`, `id_shop`) VALUES (id_block, id_shop); for each block you have replacing the green values. - Third create block for each store. LinkBlockRepository.php Link to comment Share on other sites More sharing options...
Moatazhyper Posted April 19, 2019 Share Posted April 19, 2019 On 3/29/2018 at 5:45 PM, Alejandro del Valle said: Hi everyone i have a solution for link widget, isn´t completely finished, because still missing that one block can be attached to more than one store. Solution - First you have to copy de file LinkBlockRepository.php into directory /modules/ps_linklist/src/ and replace it, is the same file, only i made a few changes. - Second you have to execute the sql sentence INSERT INTO `PREFIX_link_block_shop` (`id_link_block`, `id_shop`) VALUES (id_block, id_shop); for each block you have replacing the green values. - Third create block for each store. LinkBlockRepository.php I tried to follow this but didnt work still... it shows all blocks created in all shops ... Link to comment Share on other sites More sharing options...
Moatazhyper Posted April 19, 2019 Share Posted April 19, 2019 On 12/4/2017 at 12:21 PM, Reho said: I've done some modifications in LinkBlockRepository.php getIdByHook function: public function getByIdHook($id_hook, $id_shop = null) { $id_hook = (int) $id_hook; $id_shop = (int) (($id_shop) ?: Context::getContext()->shop->id); $sql = "SELECT cb.`id_link_block` FROM {$this->db_prefix}link_block cb LEFT JOIN {$this->db_prefix}link_block_shop lbs ON lbs.id_link_block = cb.id_link_block WHERE `id_hook` = $id_hook AND lbs.`id_shop` = $id_shop ORDER by cb.`position` "; $ids = $this->db->executeS($sql); $cmsBlock = array(); foreach ($ids as $id) { $cmsBlock[] = new LinkBlock((int)$id['id_link_block']); } return $cmsBlock; } It doesn't solves the admin part but the prublic pages shows up in correct store. You shoud edit the blocks using phpmyadmin until final upgrade arrives. Can u please copy the whole file after modification ,,,, or tell where exactly to make this modification ?? Link to comment Share on other sites More sharing options...
VTR1000 Posted June 18, 2020 Share Posted June 18, 2020 It's almost 3,5 years later and this bug is still present in the current version. Has anyone found a fix? Link to comment Share on other sites More sharing options...
Lebi Posted September 16, 2020 Share Posted September 16, 2020 On 6/18/2020 at 4:55 PM, VTR1000 said: It's almost 3,5 years later and this bug is still present in the current version. Has anyone found a fix? The error does not occur if the employee has the same language as the store's language. In other words, Back Office must have the same language as Front Office. [ My Presta: 1.7.6.2 ] Link to comment Share on other sites More sharing options...
QB_Studio Posted December 21, 2020 Share Posted December 21, 2020 Happy New 1.7.7.0, guys! It is time to solve jurrasic issues, so, what we`ve got... DB structure for ps_linklist MultiShop compatibility = thanks Alejandro del Valle PHP code for it = thanks Alejandro del Valle & Moatazhyper tell where exactly to make this modification = "you have to copy de file LinkBlockRepository.php into directory /modules/ps_linklist/src/ and replace it, is the same file" 99% solved... ? a stumbling block is : Anyone tried it? is it really works? 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