Casper_O Posted August 4, 2015 Share Posted August 4, 2015 (edited) I recently installed a new prestashop 1.6.1.0 and eveything was fine until i activated APC cache i found out that when i visited one category and wanted to use the layered navigation it will always return the same products, even if the category was supposed to be empty. At first i Thought this could be a issue with my template, so i made a clean install and tested, with the same result. Test case: 1. Clean prestashop install 2. activate SEO friendly URL and APC cache (or filesystem cache). 3. Visit "women" category. 7 articles are listed 4. Select "Tank tops" in block layered navigation, it says there is only 2 products but it continues to show all 7. 5. Go to "T-shirts" in top navigation, and you will still see the 7 products. I have checked how blocklayered.php work and from what i can see it seems like it is have a cache of the productlist.tpl that i can not explain. The category view works fine, if blocklayered is uninstalled, both with/without cache that i find pretty odd. Edited August 31, 2015 by Casper_O (see edit history) Link to comment Share on other sites More sharing options...
Monilgupta29 Posted August 4, 2015 Share Posted August 4, 2015 HI Caspar, Thanks for explaining the issues. I am also facing the same issue. I am not able to reset and delete the Layered Navigation Module. Seems some entries stuck in the table. Do you have any idea to clean database entries related to Layered Navigation block. Error While Reset in Layered Navigation block Module :- 2 errors Cannot install this module. This module has already been installed. I am not able to uninstall it also. Regards: Monil Gupta Link to comment Share on other sites More sharing options...
Monilgupta29 Posted August 4, 2015 Share Posted August 4, 2015 Hi Casper, How did you activate the APC catche and does after deactivating APC catch and SEO friendly URL , issue is resolved?? Regards: Monil gupta Link to comment Share on other sites More sharing options...
Casper_O Posted August 4, 2015 Author Share Posted August 4, 2015 Hi, I did NOT have problems to install/uninstall the module. That part work Well. Sadly I can't figure out your 2nd post. Link to comment Share on other sites More sharing options...
Monilgupta29 Posted August 5, 2015 Share Posted August 5, 2015 HI Casper, Thanks for the reply. Please let me know if you find any solution REgards: Monil Gupta Link to comment Share on other sites More sharing options...
Monilgupta29 Posted August 9, 2015 Share Posted August 9, 2015 Hi Caspar, What is APC catche and how to activate it. I am facing lots of issues with layered navigation module Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted August 10, 2015 Share Posted August 10, 2015 Not sure if the following approach will be the best solution, but it can fix your problem. Edit your blocklayered module core file blocklayered.php Find public function getProducts Then add following script underneath global $cookie; $cache = Cache::getInstance(); // Since this problem only happen with APC, flushing the cache only required if we've used APC or the activated caching system is APC if (get_class($cache) == 'CacheApc') $cache->flush(); Link to comment Share on other sites More sharing options...
Casper_O Posted August 10, 2015 Author Share Posted August 10, 2015 It also happens with file system cache (other have the same issue with memcache), but I will try it later today. My first thought is that it will remove the benefits of having APC or other cache active Link to comment Share on other sites More sharing options...
Monilgupta29 Posted August 11, 2015 Share Posted August 11, 2015 HI Caspar, Have you tried the code given by gonebdg. I am still getting the same error.Mean Same products showing in every category https://dev.kitchenhues.in/77-herbs https://dev.kitchenhues.in/164-biscuits But when i uninstalled the Layered Navigation Module v2.1.0 , then the issue is solved. First i though that it has catche issue , so i tried it on prestashop cloud with same settings and default theme but in that Layered Navigation Block is working fine and its filtering the correct results too. http://kitchenhues.pswebstore.com/106-dal Not sure about the issue. Please help. Regards: Monil gupta 9899551303 Link to comment Share on other sites More sharing options...
daxit_x Posted August 11, 2015 Share Posted August 11, 2015 Hello I also found out that blocklayered does not work with file cache active, the kind you can activate at the bottom of the page, but works normally with the other kind of cache activated and also with ccc features Another thing that does not work is the filters order, you can grab and drop the filters in a desired position, save and will work, you find the filter in the proper position in the category pages. Unfortunately if you open again the blocklayered filter template the order will be lost and the default one will be retrieved, so if you want to change something you necessarily need to order the filters again before saving, which is an oddity. A very funny stuff that happens when you move the filter position and drop it above the first filter in the grey border area is that the browser is redirected to the website www.dummy.com which is parked and "for sale". That is very very funny, ridicule, the filter ordering system is gross, does not remember last saved positions, forces you to reorder everything each time you need to change something AND if you drop a filter on the frame border you are redirected nonetheless to www.dummy.com, really dummy behaviour. Ahhha ha! Hope prestashop team fix this, the dummy.com thing might be funny, but reordering all filters each time isn't at all, pretty bad stuff while you prepare the filter templates, if you are dealing with many filters you loose a lot of time also because it is not possible to do it with a number table or a easy light way as should be not to loose time anyway (even in the case it remembers the positions) By the way, for the truth sake, when you succeed to have the layered navigation module properly working and placed in the centre column (if you have a lot of filters is more practical) it works really well and is a very useful service in all respects, you can spot out the proper product out thousands in a matter of few clicks, works well and fast, pity that you need to not forget even the smaller detail if you do not want to loose a lot of time just reordering the filters' positions. Also another thing is that the page is rolled up to top if you open a dropdown menu and do not choose a value/feature, this makes you annoyed and loosing time, not a very terrible error but surely not nice behaviour, unfriendly toward the user (again this is evident when you use a lot of filters) Bye 2 Link to comment Share on other sites More sharing options...
Casper_O Posted August 12, 2015 Author Share Posted August 12, 2015 Yeah APC and filesystem cache works when layered navigation is not activated... I did some testing yesterday that I plans to continue this morning, since I might have solved some parts of it. I successfully had APC active and showed only products from sub categories Link to comment Share on other sites More sharing options...
Casper_O Posted August 12, 2015 Author Share Posted August 12, 2015 Also I did some searching over at forge.prestashop.com For blocklayered. Seems like they are aware of it and that it might also take a long time and we might maybe see a solution in 1.6.1.1 Link to comment Share on other sites More sharing options...
Monilgupta29 Posted August 13, 2015 Share Posted August 13, 2015 HI Casper, You are right. I have activated APC catche and then face this issue : Same products in all categories. But i dont have APC catche activated in the cloud shop, then Layered Navigation block is working fine. http://kitchenhues.pswebstore.com/11-summer-dresses I have also raised this issue in forge.prestashop.com one month back , but didnot get any response http://forge.prestashop.com/browse/PNM-3532 Can you share the results if you found a fix for this issue .Thanks in advance. Regards: Monil Gupta Link to comment Share on other sites More sharing options...
gonebdg - webindoshop.com Posted August 13, 2015 Share Posted August 13, 2015 I had a demo site running with memcached and no issue found.When i've read this thread, i'm trying to use APC caching system for my Dev.Site on localhost using virtual machine, and indeed there is a problem with blocklayered.And this problem also happen if we use File System for the caching system.Not sure if this also happen if we use Xcache for the caching system. Linux #40~14.04.1-Ubuntu Apache PHP Version 5.5.9-1 APCu Version 4.0.7 PrestaShop v.1.6.1.0 Blocklayered v2.1.0 So ... I'm thingking how to clear the cache when the blocklayered filter is use, then I found out that flushing the apc cache fix the problem, as described on my previous post above.Basically it execute default php function to clear APC cache with apc_clear_cache()//php.net/manual/en/function.apc-clear-cache.phpBut flushing the cache is not work if we use File System for the caching system, but delete cache directory will fix the problem.CacheFs::deleteCacheDirectory(); $cache = Cache::getInstance(); if (get_class($cache) == 'CacheApc') $cache->flush(); elseif (get_class($cache) == 'CacheFs') CacheFs::deleteCacheDirectory(); However as I said before that was just a quick fix, and may not the best solution.Because flushing or deleting cache, remove the advantage from the use of the caching system itself eventhough it only for the blocklayered module. 1 Link to comment Share on other sites More sharing options...
Casper_O Posted August 22, 2015 Author Share Posted August 22, 2015 (edited) Seems like a solution have been found I don't had time to test it yet but it do look promising http://forge.prestashop.com/browse/NM-574 Solution Can be found in this pull at github https://github.com/PrestaShop/blocklayered/pull/88 Edited October 25, 2015 by Casper_O (see edit history) Link to comment Share on other sites More sharing options...
frank_jarle Posted August 31, 2015 Share Posted August 31, 2015 Is this issue the same as when SMARTY-cache is turned on? I am having strange issue when i turn on SMARTY-cache that on the main page that [New Arrivals] tab hides the products. If i disable SMARTY-cache then it works. So my question @gonebdg: will your "fix" benefit my issue as well? Frank Link to comment Share on other sites More sharing options...
Casper_O Posted August 31, 2015 Author Share Posted August 31, 2015 Gonebdg solution World most likely NOT fix it for you. Also, it did kind of damage our performance instead. I would suggest you to check forge and github, maybe make your own topic here Link to comment Share on other sites More sharing options...
ajensen27 Posted October 22, 2015 Share Posted October 22, 2015 I had a demo site running with memcached and no issue found. When i've read this thread, i'm trying to use APC caching system for my Dev.Site on localhost using virtual machine, and indeed there is a problem with blocklayered. And this problem also happen if we use File System for the caching system. Not sure if this also happen if we use Xcache for the caching system. Linux #40~14.04.1-Ubuntu Apache PHP Version 5.5.9-1 APCu Version 4.0.7 PrestaShop v.1.6.1.0 Blocklayered v2.1.0 So ... I'm thingking how to clear the cache when the blocklayered filter is use, then I found out that flushing the apc cache fix the problem, as described on my previous post above. Basically it execute default php function to clear APC cache with apc_clear_cache() //php.net/manual/en/function.apc-clear-cache.php But flushing the cache is not work if we use File System for the caching system, but delete cache directory will fix the problem. CacheFs::deleteCacheDirectory(); $cache = Cache::getInstance(); if (get_class($cache) == 'CacheApc') $cache->flush(); elseif (get_class($cache) == 'CacheFs') CacheFs::deleteCacheDirectory(); However as I said before that was just a quick fix, and may not the best solution. Because flushing or deleting cache, remove the advantage from the use of the caching system itself eventhough it only for the blocklayered module. Any idea what the code would be if I'm using xcache? Thanks! Link to comment Share on other sites More sharing options...
wremacle Posted October 24, 2015 Share Posted October 24, 2015 Hello, Any news on this bug? I also have it. Clearing the cache is not a solution for me (disabling the cache would be exactly the same, or almost...) Thanks. Link to comment Share on other sites More sharing options...
ajensen27 Posted October 24, 2015 Share Posted October 24, 2015 I switched to memcache and now it's working fine. Except the little x that's supposed to remove the filter doesn't do anything. You have to uncheck the selected filter in order to remove it. Anyone know what might be causing this? Link to comment Share on other sites More sharing options...
Casper_O Posted October 25, 2015 Author Share Posted October 25, 2015 I marked the correct post now, that haves the answer you might be looking for Link to comment Share on other sites More sharing options...
wremacle Posted October 25, 2015 Share Posted October 25, 2015 Thanks! 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