-
AuthorPosts
-
November 12, 2014 at 11:20 am #202660
Hi,
I’ve noticed that when I’m browsing on pages of masonry layout I’m getting display issues when switching between list/grid layout if I have joomla cache enabled.
Steps to reproduce the problem are:
0. enable joomla cache
1. go to http://www.mgrd.it/en/projects.html
2. select the list layout
3. open a random project
4 go back to http://www.mgrd.it/en/projects.htmlI believe there are conflicts between ‘blog-layout’ cookie logic and page cache, but can’t get to resolve this problem by myself.
Any help appreciated.
Regards
Giorgio
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 14, 2014 at 4:20 am #555181Hi Giorgio,
Please open file root_folder/templates/ja_decor/js/script.js and look for this code :
(function ($) {
$(document).ready(function(){
//Checking div grid.blog
if($('.grid.blog').length > 0){then update as below :
(function ($) {
$(document).ready(function(){
if($.cookie('blog-layout') == 'undefined' || $.cookie('blog-layout') == null) {
$.cookie('blog-layout', '1', {path:'/'});
}//Checking div grid.blog
if($('.grid.blog').length > 0){Save your file, clear browser / Joomla! cache and reheck.
November 14, 2014 at 10:31 am #555214Hi Adam,
I’m sorry to say that this solution didn’t solved the problem.
My idea is that Joomla! cache is the problem: when I browse for the first time to the page at step1 this is being cached by joomla. Now, switch from grid to list (or viceversa) will set cookie correctly, but when I’ll request back this page the server will serve me the cached content with the js and css changed according to the cookie value.
In example:
– I visit for the first time the page wit cookie=1. Actions involved are: I see the list layout and page is cached (all classes according to cookie=1 are set in this cached page);
– then I change layout to grid. Actions involved are: cookie=0, page is not cached.
– I refresh the page: server will give me the cached page which has all classes for the cookie=1 value, but js evaluate the real cookie value (=0) and apply his logic accordingly.
– the result is a page with css classes for the list layout and some other js-made css for the grid layout = weird.I’ll temporary fixed this by installing a 3rd party extension who prevents caching for this single page.
Not really solved I think.
Any other idea?
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 17, 2014 at 4:57 am #555360Hi @risolviamo,
I checked your site but didn’t see any problem when trying to reproduce the issue. Did you manage to sort it out ?
November 17, 2014 at 10:59 am #555430Yes as I said in my previous post
<blockquote>I’ll temporary fixed this by installing a 3rd party extension (a plugin) who prevents caching for this single page.</blockquote>I just disabled it as I’m writing this post.
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 18, 2014 at 2:20 am #555492Hi @risolviamo,
I tried to enable System Cache plugin in your site to reproduce the issue but didn’t see any problem after that as well. Could you please clarify a little bit about the way you temporary fix the problem so I can report to development team ?
November 18, 2014 at 2:50 pm #555609Hi Adam,
I used the plugin CacheControl to prevent Joomla! from caching the single page with the grid/list layout.
Adam M ModeratorAdam M
- Join date:
- May 2014
- Posts:
- 5159
- Downloads:
- 33
- Uploads:
- 66
- Thanks:
- 95
- Thanked:
- 1271 times in 1235 posts
November 19, 2014 at 5:04 am #555693Hi @risolviamo,
I see that you disabled plugin CacheControl and System – Cache is enabled but the front-end looks fine. Could you please confirm your current status ?
Andrzej Wachałowicz FriendAndrzej Wachałowicz
- Join date:
- March 2015
- Posts:
- 23
- Downloads:
- 91
- Uploads:
- 22
- Thanks:
- 18
- Thanked:
- 1 times in 1 posts
November 21, 2014 at 4:42 pm #556114<em>@risolviamo 452775 wrote:</em><blockquote>
1. go to http://www.mgrd.it/en/projects.html
</blockquote>Hi.
I wonder how You create shadows under the header?
Can you, please, tell me how to to do that?Andrew
______________OK, I managed that:
I must enter in templates/ja_decor/template.css or in templates/ja_decor/local/css/themes/my-theme-name/template.css the following code:
.t3-header {
box-shadow: 0px 4px 5px #000000
}Outcome: link
-
AuthorPosts
This topic contains 9 replies, has 3 voices, and was last updated by Andrzej Wachałowicz 10 years, 1 month ago.
We moved to new unified forum. Please post all new support queries in our New Forum