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”>
$(“#stexpand<?php echo $msg_id;?>”).oembed(“<?php echo $orimessage;?>”,{maxWidth: 400, maxHeight: 300});

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.

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.

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.

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

Thanks for this reply. I will ask other problems very soon.