test
Viewing 9 posts - 1 through 9 (of 9 total)
  • Author
    Posts
  • risolviamo Friend
    #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.html

    I 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 Moderator
    #555181

    Hi 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.

    risolviamo Friend
    #555214

    Hi 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 Moderator
    #555360

    Hi @risolviamo,

    I checked your site but didn’t see any problem when trying to reproduce the issue. Did you manage to sort it out ?

    risolviamo Friend
    #555430

    Yes 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 Moderator
    #555492

    Hi @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 ?

    risolviamo Friend
    #555609

    Hi Adam,

    I used the plugin CacheControl to prevent Joomla! from caching the single page with the grid/list layout.

    Adam M Moderator
    #555693

    Hi @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 Friend
    #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

Viewing 9 posts - 1 through 9 (of 9 total)

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