-
AuthorPosts
-
August 31, 2018 at 11:04 am #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!
September 1, 2018 at 2:51 pm #1004377Hey 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,
RikardSeptember 3, 2018 at 11:58 pm #1005230it 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.
September 4, 2018 at 8:52 am #1005322Hi 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,
NikkoSeptember 4, 2018 at 4:32 pm #1005673Hi
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!
September 4, 2018 at 8:37 pm #1005758Hi 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,
NikkoSeptember 11, 2018 at 3:17 pm #1008430This reply has been marked as private.September 13, 2018 at 10:24 am #1009307Hi,
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,
PeterSeptember 13, 2018 at 4:44 pm #1009504thanks Dude :)
September 13, 2018 at 4:53 pm #1009513Hi,
Glad we could help you :)
Best regards,
PeterSeptember 17, 2018 at 10:23 am #1010646Hi 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!
September 18, 2018 at 8:03 am #1011127Hi,
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,
PeterSeptember 18, 2018 at 1:56 pm #1011289Hi
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
September 18, 2018 at 3:31 pm #1011352hi
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!
September 18, 2018 at 7:39 pm #1011473I tried it on android and an iphone and the flags do not work properly
September 19, 2018 at 3:46 pm #1011867Hi 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,
NikkoSeptember 25, 2018 at 12:31 pm #1014161Hi
which js script do I hook to which header file?
thanks!
September 25, 2018 at 12:34 pm #1014162could there be an error in the css, or the way the css is loading that could be slowing it down?
thanks
September 25, 2018 at 6:57 pm #1014391Hi smoothbob,
Can you try to change wp_footer in:
add_action('wp_footer', 'ava_auto_resize');
to
wp_head
Best regards,
NikkoSeptember 26, 2018 at 3:24 pm #1014781Hi
sorry, I don;t now which file to edit, it’s not the theme footer file or a Wp file…is it?
thanks :)
September 26, 2018 at 4:00 pm #1014813Hi 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,
NikkoSeptember 27, 2018 at 12:15 pm #1015257OK 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
October 8, 2018 at 4:44 pm #1019049Hi
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!
October 9, 2018 at 11:19 am #1019426as 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!
October 9, 2018 at 12:18 pm #1019447Hi 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,
NikkoOctober 9, 2018 at 12:32 pm #1019460Hi
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
:)
October 13, 2018 at 9:03 am #1021007Hi 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,
NikkoOctober 17, 2018 at 12:05 pm #1022707Hi
I used the other plugin and it worked right away…ha ha
thanks for your help anyway :)
October 17, 2018 at 2:53 pm #1022786Hi 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,
NikkoOctober 22, 2018 at 12:57 pm #1024832Cube portfolio – good plugin, used many times
-
AuthorPosts
- The topic ‘Ajax window stopped working’ is closed to new replies.