SitePoint Sponsor

User Tag List

Results 1 to 5 of 5
  1. #1
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Uncaught TypeError: Cannot read property 'code' of null and many more errors

    Hello, I have signed up just now. My question is about a plugin Oembed.js.

    I have created a simple wall post script which have embedded video url features.
    Video is embedding but my other jquery script not working well like image uploading and auto suggestion script. And when i try to upload image it again throw an


    1. Uncaught TypeError: Cannot read property 'code' of null

    2. Unsafe JavaScript attempt to access frame with URL http://localhost:8080/facebook /user_index1.php?id=7 from frame with URL http://www.youtube.com/embed/qQ4pFarbVzo?feature=oembed. Domains, protocols and ports must match.
    [jquery.form] terminating; zero elements found by selector





    Jquery code:

    <script type="text/javascript">
    $(document).ready(function(){
    $("#stexpand<?php echo $msg_id;?>").oembed("<?php echo $orimessage;?>",{maxWidth: 400, maxHeight: 300});
    });
    </script>


    Omembed.js source:http://wall.9lessons.info/js/jquery.oembed.js


    Where php variable '$orimessage' come from a textbox.



    First try to solve 'code' of null error then i will ask other problems.

  2. #2
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,700
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by vny.009 View Post
    First try to solve 'code' of null error then i will ask other problems.
    Sure things - please link us to a test page that has the problem, so that we may investigate the cause of the issue and solve it for you.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  3. #3
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Quote Originally Posted by paul_wilkins View Post
    Sure things - please link us to a test page that has the problem, so that we may investigate the cause of the issue and solve it for you.
    i have already mentioned a web address but again giving exact one:http://wall.9lessons.info/index1.php

    This is from where i downloaded the script. This has also same problem of 'Uncaught type error' which can be seen on crome developer console.

    i will give you my website (where the problem exists) after uploading files to the server. Right now i am working on localhost.


    Thanks for your reply.

  4. #4
    Unobtrusively zen silver trophybronze trophy
    paul_wilkins's Avatar
    Join Date
    Jan 2007
    Location
    Christchurch, New Zealand
    Posts
    14,700
    Mentioned
    101 Post(s)
    Tagged
    4 Thread(s)
    Quote Originally Posted by vny.009 View Post
    i have already mentioned a web address but again giving exact one:http://wall.9lessons.info/index1.php
    This is from where i downloaded the script. This has also same problem of 'Uncaught type error' which can be seen on crome developer console.
    Ahh okay - I misunderstood the nature of the problem. It's not with your own site, but with the plugin itself.

    The problem happens because the callback is being called with nothing provided for the oembed variable.

    Code javascript:
    if (!callback) callback = function(container, oembed) {			
        ...
    };
    ...
    callback(container, null);

    It would be appropriate, I think, to take up this issue with the plugin developer.

    There's a fix for the problem over at http://ckeditor.com/comment/124393#comment-124393
    Last edited by paul_wilkins; May 1, 2013 at 13:48.
    Programming Group Advisor
    Reference: JavaScript, Quirksmode Validate: HTML Validation, JSLint
    Car is to Carpet as Java is to JavaScript

  5. #5
    SitePoint Member
    Join Date
    Apr 2013
    Posts
    17
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for this reply. I will ask other problems very soon.


Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •