ckeditor-youtube-plugin icon indicating copy to clipboard operation
ckeditor-youtube-plugin copied to clipboard

Uncaught TypeError: Cannot read property 'title' of undefined

Open KingCrows opened this issue 7 years ago • 11 comments

Hi there, I've just tried to add the Youtube plugin to my CKeditor setup. As told in the documentation i set it up by adding the config.extraPlugins and config.toolbar. But I get another error. Any idea what might cause this?

Thanks!!

Uncaught TypeError: Cannot read property 'title' of undefined at Object.init (ckeditor.js:623) at Object.<anonymous> (ckeditor.js:264) at f (ckeditor.js:244) at Object.load (ckeditor.js:244) at ckeditor.js:263 at CKEDITOR.resourceManager.<anonymous> (ckeditor.js:251) at CKEDITOR.resourceManager.<anonymous> (ckeditor.js:249) at f (ckeditor.js:244) at Array.B (ckeditor.js:244) at u (ckeditor.js:244)

KingCrows avatar Apr 20 '17 14:04 KingCrows

Hi! What version of CKEditor are you using? Try to remove the config.toolbar custom configuration, leave only the config.extraPlugins

fonini avatar Apr 20 '17 14:04 fonini

Thanks for de quick response. I'm using CKEditor 4.6.2 & leaving only the config.extraPlugins didn't help... Still getting the same error

KingCrows avatar Apr 20 '17 15:04 KingCrows

Can you post your config file somewhere?

Also, have you tried to clear the browser cache?

Em 20/04/2017 12:16, "KingCrows" [email protected] escreveu:

Thanks for de quick response. I'm using CKEditor 4.6.2 & leaving only the config.extraPlugins didn't help... Still getting the same error

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/fonini/ckeditor-youtube-plugin/issues/55#issuecomment-295774751, or mute the thread https://github.com/notifications/unsubscribe-auth/AANLTTogAcPvYNKeGtg4ITfz0FDeRPGXks5rx3bpgaJpZM4NDFd8 .

fonini avatar Apr 20 '17 16:04 fonini

You can download the file here: https://we.tl/MuKqV2eXdX Also i always debug in Chrome and have the "disable cache" option enabled. That way nothing is cached.

KingCrows avatar Apr 21 '17 06:04 KingCrows

Hi fonini, did you had any change to look at the config file?

Thanks!!

KingCrows avatar Apr 23 '17 10:04 KingCrows

Really strange. I've tried your config file and everything is working fine on my machine. The only thing I needed to add is the Youtube button to the toolbar.

Replace { name: 'insert', items : ['HorizontalRule']},
with { name: 'insert', items : ['HorizontalRule', 'Youtube']},

fonini avatar Apr 24 '17 10:04 fonini

Still getting the same error :-( Really have no idea what could cause this error...

KingCrows avatar Apr 24 '17 17:04 KingCrows

You could try to download a CKEditor copy with the Youtube plugin already bundled and see if it works: http://ckeditor.com/builder

Just for curiosity, which locale are you using?

fonini avatar Apr 24 '17 18:04 fonini

Maybe i need to try that. I'm uploading all my files directly to my online dev environment (apache). Tomorrow or Thursday i will have some time to try the bundled version, i will get back to you by then! Thanks again!!

KingCrows avatar Apr 25 '17 06:04 KingCrows

Here's what my console says: Uncaught TypeError: Cannot read property 'title' of undefined

And it points to this code line (plugin.js:70): --- lineheight plugin addCombo( editor, 'lineheight', 'size', editor.lang.lineheight.title, config.line_height, editor.lang.lineheight.title, config.lineHeight_style, 40 );

any solution?

williamsherlock avatar Jan 15 '18 12:01 williamsherlock

This problem is presented by not placing the language script in the file index.

<head>
<script type="text/javascript"  src="assets/ckeditor/lang/en.js"></script>
<script type="text/javascript"  src="assets/ckeditor/lang/es.js"></script>
<script type="text/javascript"  src="assets/ckeditor/lang/fr.js"></script>
</head>

Then, they should confirm that all the tags are in the scripts. Regards!

iczabalegui2h avatar Sep 18 '18 16:09 iczabalegui2h