Okay
  Public Ticket #356910
Gravity forms (ajax) conflicting with nectar slider
Closed

Comments

  • Ralph started the conversation

    Hi,

    I would like to create a menu with a contact form as a subitem making use of gravity forms and ubermenu

    There is an issue of the nectar slider not displaying when a gravity forms using Ajax is placed under a menu item.  (see screenshot). Pressing F5 refresh however does show the slider.

    The issue occurs in Chrome, as far as I know not in IE and Firefox.

    When turning Ajax off in gravity forms the nectar slider does work. The Ajax effect is preferred as otherwise the homepage needs to load again in order to finish the form.

    Do you know what causes this and how this can be fixed?

    Thnx in advance!

  •  8,849
    Tahir replied

    Hey!

    Please try switching to Standard ajax method in Salient Theme Options -> Page transitions. 

    Thanks 


    ThemeNectar Support Team 

  • Ralph replied

    Hi,

    I have switched tot "Standard ajax method", but unfortunately this doesn't solve the problem. Do you perhaps have an other solution?

  •  1,075
    ThemeNectar replied

    Hey Ralph! Checking on my end I can't see that error occuring - the nectar slider seems to be loading on the first attempt in chrome without a page refresh. What OS and version are you using?

    Cheers

  • Ralph replied

    When you visit the site for the first time it is usually shown just fine. If you browse through the pages and then return to for example the homepage, the slider stucks as the picture shown earlier.

    Browser: Chrome version: Versie 40.0.2214.91 m

    OS: Windows 8.1

  •  1,075
    ThemeNectar replied

    Hey again - I can now replicate the issue. Unfortunately since there's no errors being reported in the console it's a little tricky to troubleshoot from looking at the front. Have you tried to see if the issue occurs when using a gravity form with ajax on a page or if it's only menu it's in the uber menu?

    Cheers

  • Ralph replied

    It happens in both situatiions.

    Example page: http://178.18.87.242/~loods038/prijzen/

    This page doesn't have a form and here the issue also occurs.

    Edit: changed word "menu" in "form" in last line (typo)

  • Ralph replied

    Hi there! Already any thoughts about the issue?

  •  1,075
    ThemeNectar replied

    Hey Ralph,

    Try changing this section in the init.js file 

    if (match) {        
         var slideImg = new Image();
         slideImg.src = match[1];
    				
        $(slideImg).load(function(){ 
    	showSliderControls();
            sliderLoadIn($that);
    	captionTransition($nectarSliders[i]);
        });
    }	        	
    

    to this:

          
         var slideImg = new Image();
         slideImg.src = match[1];
    				
      
        showSliderControls();
        sliderLoadIn($that);
        captionTransition($nectarSliders[i]);
        
    	        	
    

    Cheers

  • Ralph replied

    Hi Nectar,

    Thanks for trying to help me out, but the posted solution doesn't have any effect (yet). The text also doesn't match exactly what you state. The section you mentioned can't be fount in the init.js file, but in the nectar-slider file within the JS folder.

    The sections states the following, what is also a little different (but close):


    if (match) {

    var slideImg = new Image();

    slideImg.src = match[1];

    $(slideImg).load(function(){

    showSliderControls();

    resizeToCover();

    slideContentPos();

    sliderLoadIn($that);

    captionTransition($nectarSliders[i]);

    darkFirstSlide($that);

    });

    }

    }


    I changed it to:



    showSliderControls();

    resizeToCover();

    slideContentPos();

    sliderLoadIn($that);

    captionTransition($nectarSliders[i]);

    darkFirstSlide($that);

    });

    }


    This still causes the slider not to load (cleared the cache just in case)

    Did I make a mistake in the changes or doesn't this solve the problem?


    Thanks again!



  •  1,075
    ThemeNectar replied

    Hey again! Anyway you could allow me to log in so I can try another change for you?

    Cheers

  •   Ralph replied privately
  •  1,075
    ThemeNectar replied

    Hey again! For some reason that URL is leading to a 404 - could you verify it's correct?

    Cheers

  •   Ralph replied privately
  •  1,075
    ThemeNectar replied

    Hey,

    I just made a change in regards - could you see if it helped?

    Cheers

  • Ralph replied

    Hi,

    Thanks, it does help! Now it loads normally. Thank you for your great support.

    Is the solution "update-proof" or do I have to manually insert some code after I update to a next version of the theme?

  •  8,849
    Tahir replied

    Hey Ralph!

    The new update will have the fix included.

    Cheers


    ThemeNectar Support Team 

  • Ralph replied

    OK, thanks!

  • Ralph replied

    Hi,


    Updating the theme to 5.5.x reintroduces the old-problem: The nectar slider often doesn't load again in Chrome. (see problem above)

    Isn't the issue fixed in the update and do you need to fix it manually again? It was stared however that it should have been fixed in the update


    Thanks in advance!

  •  1,075
    ThemeNectar replied

    Hey - currently the nectar-slider.js file in your js folder is not writable so unfrotunately I can't make the same edit as last time for you. Could you change the permissions on it?

    Cheers

  • Ralph replied

    Hi,

    I updated to 5.5.4 and made the file writable.

    Will the issue be corrected in the next version, of will it be neceessary to make the changes every time I do an update? It is bit of a hassle that way.


    Thanks for helping me out again!

  •  1,075
    ThemeNectar replied

    Hey - all working now? The fix I added is only a temp fix which can't be put in the main theme release since it would cause conflicts for users not using gforms but I'm still working on a permanent fix :)

  • Ralph replied

    Thanks, it is working again. Great!

    Is it possible to tell me what the temp fix is, otherwise next time I update I will have to be knocking at your door again. You'll probably have other stuff to do as well ;-).

    Thank you for the support and the great theme you have.

  •  1,075
    ThemeNectar replied

    Hey again! All that needed changing was

    $(slideImg).load(function(){ 
        showSliderControls();
        resizeToCover();
        slideContentPos();
        sliderLoadIn($that);
        captionTransition($nectarSliders[i]);
        darkFirstSlide($that);
    });
    
    to this:
    
        showSliderControls();
        resizeToCover();
        slideContentPos();
        sliderLoadIn($that);
        captionTransition($nectarSliders[i]);
        darkFirstSlide($that);
    
    
  • Ralph replied

    Ok, thanks!