Viewing 30 posts - 1 through 30 (of 31 total)
  • Author
    Posts
  • #1004020

    HI

    everything on this site was fine when I left it a few weeks ago but now the ajax window function is not working on the flags – it does not load the portfolio item preview box.

    I didn’t change anything but I have now updated wordpress

    hope you can help, thanks!

    #1004377

    Hey smoothbob,

    Please send us a temporary admin login and login URL so that we can have a closer look. You can post the details in the Private Content section of your reply.

    Best regards,
    Rikard

    #1005230

    it works if you load a tab, load a different tab, then go back to the first tab. thanks!

    • This reply was modified 6 years, 2 months ago by Nikko.
    #1005322

    Hi smoothbob,

    Thanks for giving us admin access.
    I have tried to disable Javascript file merging and compression in Enfold > Performance to check the issue further however the built-in caching from your site (not from plugin) is preventing the change (the settings are saved but if you check the page source, the js files are still merged and compressed). Can you flush out the cache? so we can test this further as there is no error in the console appearing.

    Best regards,
    Nikko

    #1005673

    Hi

    I cleared the cache on the server but still the same issue. I installed W3 Total Cache and purged the cache but nothing. that plugin seemed to slow the site down so I deactivated it.

    thanks!

    #1005758

    Hi smoothbob,

    I checked the page source and the js files are still compressed and merged.
    Can you give us ftp access? so we can try to debug it.
    Please put the ftp credentials in Private Content field, so it’s only visible to the moderators.

    Best regards,
    Nikko

    #1008430
    This reply has been marked as private.
    #1009307

    Hi,

    I fixed the issue – I had to add this code to the child theme functions.php:

    
    add_action('wp_footer', 'ava_auto_resize');
    function ava_auto_resize(){
    ?>
    <script>
    (function($){	
    	var int = window.setInterval(function(){
    		$(window).trigger('resize');
    		$(window).trigger('av-content-el-height-changed');
    	}, 1000);
    })(jQuery);
    </script>
    <?php
    }
    

    Best regards,
    Peter

    #1009504

    thanks Dude :)

    #1009513

    Hi,

    Glad we could help you :)

    Best regards,
    Peter

    #1010646

    Hi again

    seems this is not quite fixed.

    I tried it in 3 different browsers and the performance of the ajax window is sporadic. sometimes it works and sometimes it doesn’t, the behaviour is not regular so I do not think it is a problem in the content – some times tabs work sometimes then don’t work if you click back on them etc etc

    if you could take another look that would be great

    thanks!

    #1011127

    Hi,

    Please note you need to wait some seconds (2-3 seconds) until you click on an item. Otherwise the ajax portfolio data is not initialized and this can break the portfolio. You can activate the preloader effect (Enfold > Theme Options) if you want to make sure that your users can’t click on an item before the page content is loaded.

    Best regards,
    Peter

    #1011289

    Hi

    is there any way to apply the loader to the ajax items? the problem seems to be a lag loading the flags…clicking too soon sometimes results in the error…maybe it’s server lag/slow loading or something?

    thanks

    #1011352

    hi
    the client is using safari and if he tries Europe then Middle East it does not work, but changing the order it then works

    “If I change the entry order, it works ”

    so something awry somewhere I think

    thanks!

    #1011473

    I tried it on android and an iphone and the flags do not work properly

    #1011867

    Hi smoothbob,

    The page seems to load slower.
    If you click on the link with #europe hash it is more likely that the issue occurs since the js script isn’t loaded yet.
    Try to hook the js script to the header and make enable the page loader.
    Hope this helps.

    Best regards,
    Nikko

    #1014161

    Hi

    which js script do I hook to which header file?

    thanks!

    #1014162

    could there be an error in the css, or the way the css is loading that could be slowing it down?

    thanks

    #1014391

    Hi smoothbob,

    Can you try to change wp_footer in:

    add_action('wp_footer', 'ava_auto_resize');

    to

    wp_head

    Best regards,
    Nikko

    #1014781

    Hi

    sorry, I don;t now which file to edit, it’s not the theme footer file or a Wp file…is it?

    thanks :)

    #1014813

    Hi smoothbob,

    You should find it in functions.php if you have added the code Peter gave in:

    you should find this code:

    add_action('wp_footer', 'ava_auto_resize');

    then replace wp_footer with wp_head

    Best regards,
    Nikko

    #1015257

    OK thanks, I will see how it goes. the client said with the preloader things were much better but I was still getting the occasional not loading glitch – as the preloader loads the page but not all the ajax content and that seems to be the bottleneck…

    anyway if the clients says nothing more then cool…thanks for your help

    #1019049

    Hi

    there are still issues loading..

    I removed all the css and that was not the problem but I think this is the problem that is causing it to not load some times or on safari/mobile etc

    function ava_custom_script_portfolio_preview() {
    ?>
    <script>
    (function($) {
    $(document).ready(function() {
    $(‘.grid-sort-container’).each( function() {
    var preview = $(this).prev(‘.portfolio_preview_container’);
    var sort = $(this);
    preview.insertAfter(sort);
    });
    });
    })(jQuery);
    </script>
    <?php
    }
    add_action( ‘wp_footer’, ‘ava_custom_script_portfolio_preview’, 9999 );

    function av_larger_quick_css() {
    echo ‘<style>#avia_quick_css .avia_control textarea {
    min-height: 400px;
    }
    .avia_sidebar_active #avia_quick_css .avia_description {
    width: 30%;
    }
    .avia_sidebar_active #avia_quick_css .avia_control {
    width: 70%;
    }
    </style>’;
    }
    add_action(‘admin_head’, ‘av_larger_quick_css’);

    //set builder mode to debug
    add_action(‘avia_builder_mode’, “builder_set_debug”);
    function builder_set_debug()
    {
    return “debug”;
    }

    add_action(‘wp_head’, ‘ava_auto_resize’);
    function ava_auto_resize(){
    ?>
    <script>
    (function($){
    var int = window.setInterval(function(){
    $(window).trigger(‘resize’);
    $(window).trigger(‘av-content-el-height-changed’);
    }, 1000);
    })(jQuery);
    </script>
    <?php
    }

    anything that can be done?

    thanks!

    #1019426

    as a follow up, it seems to be OK now but what I wanted to achieve was having the window open underneath the flags, which is what the above code does ( I guess :) )

    but something in this code is screwing up the rest I think

    thanks again!

    #1019447

    Hi smoothbob,

    I’m not really sure why that’s happening on selected browsers.
    Can you try to disable other plugins you have and flush out the cache? this might help fix the issue.

    Best regards,
    Nikko

    #1019460

    Hi

    it is not on selected browsers…I have problems on all browsers intermittently as do other people, but this code is the thing that screws up safari and mobile for sure

    asking everyone to clear their cache is not going to work :)

    could this be down to a slow server. my hosting sometimes drops out…

    or is there a bug in that code, perhaps I have entered something wrong and that is causing the slow loading

    I also tried various caching plugins etc on the site but nothing seems to make any difference and I am not exactly sure what I am doing, as nothing seems to make any difference haha

    :)

    #1021007

    Hi smoothbob,

    The server is also another factor if it’s slow or unstable then there’s also chance that js/css aren’t loaded properly which probably could be the cause why it isn’t loading sometimes but also does load properly sometimes.
    You can also comment out js codes that might not be necessary but if the problem is on js then the behavior should be consistently showing the issue each load.

    Best regards,
    Nikko

    #1022707

    Hi

    I used the other plugin and it worked right away…ha ha

    thanks for your help anyway :)

    #1022786

    Hi smoothbob,

    Glad to hear that it worked fine now.
    What plugin did you use? it might help others having issues same as yours.

    Best regards,
    Nikko

    #1024832

    Cube portfolio – good plugin, used many times

Viewing 30 posts - 1 through 30 (of 31 total)
  • The topic ‘Ajax window stopped working’ is closed to new replies.