Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Maff 141 posts 465 karma points
    Oct 21, 2013 @ 10:23
    Maff
    0

    Contour form in fancybox gives javascript error

    I'm trying to get a Contour form to load up in a fancybox, and no matter how I embed the form I get the following JavaScript error when I try to launch the fancybox:

    Uncaught TypeError: Cannot read property 'adapters' of undefined

    I'm embedding the form using the Umbraco Macro (Razor view) which works fine if the form is displayed in a non-modal page.

    I've tried embedding the form in hidden div on the page that calls it, and linking to the div ID. I've tried embedding the form in an already existing page that loads fine in the fancybox modal. I've also tried creating a brand new template (including all the JQuery files in the header) with the form in. None of these work.

    Has anyone encountered this issue before?

    Thanks,

    Maff

  • Comment author was deleted

    Oct 21, 2013 @ 10:28

    Can you see where the errors is coming from, so which js file?

  • Maff 141 posts 465 karma points
    Oct 21, 2013 @ 10:31
    Maff
    0

    Hi Tim,

    Here's the full error:

    1. Uncaught TypeError: Cannot read property 'adapters' of undefined
      1. (anonymous function)
      2. (anonymous function)
      3. (anonymous function)jquery-1.8.1.js:564
      4. jQuery.extend.globalEvaljquery-1.8.1.js:565
      5. jQuery.ajaxSetup.converters.text scriptjquery-1.8.1.js:8105
      6. jQuery.extend.ajaxjquery-1.8.1.js:7833
      7. (anonymous function)jquery-1.8.1.js:5856
      8. jQuery.extend.eachjquery-1.8.1.js:611
      9. jQuery.fn.extend.domManipjquery-1.8.1.js:5853
      10. jQuery.fn.extend.appendjquery-1.8.1.js:5626
      11. (anonymous function)jquery-1.8.1.js:5753
      12. jQuery.extend.accessjquery-1.8.1.js:814
      13. jQuery.fn.extend.htmljquery-1.8.1.js:5717

     

    Thanks,

    Maff


  • Comment author was deleted

    Oct 21, 2013 @ 10:47

    mkay thanks for extra details will try to reproduce

  • Maff 141 posts 465 karma points
    Oct 21, 2013 @ 10:55
    Maff
    0

    Thanks Tim. Please let me know if you need more detail.

    Maff

  • Comment author was deleted

    Oct 21, 2013 @ 11:46

    It's this one that you are using right http://fancybox.net/ ?

  • Maff 141 posts 465 karma points
    Oct 21, 2013 @ 11:48
    Maff
    0

    yes - version 1.3.4

  • Comment author was deleted

    Oct 21, 2013 @ 11:51

    Ok will give it a try

  • Maff 141 posts 465 karma points
    Oct 23, 2013 @ 09:28
    Maff
    0

    Hi Tim,

    Did you have any luck investigating this issue?

    Thanks,

    Maff

  • Maff 141 posts 465 karma points
    Oct 23, 2013 @ 17:44
    Maff
    101

    I fixed this myself by creating my own Umbraco contact form instead of using Contour. I found this article which worked a treat:

    http://www.blogfodder.co.uk/2011/12/30/simple-contact-form-template-for-umbraco

    Maff

  • Matthew Hardesty 22 posts 73 karma points
    Nov 20, 2014 @ 06:53
    Matthew Hardesty
    0

    This happened for me also.

    Initially, I had an error with contour.js saying jquery not defined. I resolved that by placing the jquery reference in the head of the document. But after doing that, I get the same error you did.

    Uncaught TypeError: Cannot read property 'setDefaults' of undefined contourform.js:5 (anonymous function) (anonymous function)

    Google doesn't help and it doesn't look like this has been addressed on the forum either.

    I want to like Contour, but I'm jumping through hoops to get it to work. I wish I could chat with someone who actually has this working on Umbraco 7.x.

  • Matthew Hardesty 22 posts 73 karma points
    Nov 20, 2014 @ 07:32
    Matthew Hardesty
    0

    Apologies for double post. After looking into this for some time, I discovered that the installation of contour doesn't automatically add the necessary script references to the head of your document.

    So, be sure to include the following script references (this is what works for me) in the head:

            <script src="//ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
            <link rel="stylesheet" href="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/themes/smoothness/jquery-ui.css" />
            <script src="//ajax.googleapis.com/ajax/libs/jqueryui/1.11.2/jquery-ui.min.js"></script>
            <script src="http://ajax.aspnetcdn.com/ajax/jquery.validate/1.9/jquery.validate.min.js"></script>
            <script src="http://ajax.aspnetcdn.com/ajax/mvc/3.0/jquery.validate.unobtrusive.min.js" type="text/javascript"></script>
    
Please Sign in or register to post replies

Write your reply to:

Draft