Issue with TinyMCE in Dashboard

82 views
Skip to first unread message

Cascadian Tech

unread,
Jan 24, 2018, 7:09:42 PM1/24/18
to django-oscar
I am getting these errors in my Dev Console when trying to add a product to a content block in the Oscar Dashboard:

jquery.tinymce.min.js:1 Uncaught ReferenceError: global is not defined
    at jquery.tinymce.min.js:1
    at jquery.tinymce.min.js:1
(anonymous) @ jquery.tinymce.min.js:1
(anonymous) @ jquery.tinymce.min.js:1
dashboard.js:196 Uncaught TypeError: $textareas.filter(...).tinymce is not a function
    at Object.initWYSIWYG (dashboard.js:196)
    at Object.initWidgets (dashboard.js:81)
    at Object.init (dashboard.js:45)
    at HTMLDocument.<anonymous> ((index):597)
    at c (jquery.min.js:3)
    at Object.fireWith [as resolveWith] (jquery.min.js:3)
    at Function.ready (jquery.min.js:3)
    at HTMLDocument.H (jquery.min.js:3)
initWYSIWYG @ dashboard.js:196
initWidgets @ dashboard.js:81
init @ dashboard.js:45
(anonymous) @ (index):597
c @ jquery.min.js:3
fireWith @ jquery.min.js:3
ready @ jquery.min.js:3
H @ jquery.min.js:3

There seems to be some issue with the loading of TinyMCE. I've tried to substitute a different CDN but this doesn't seem to do anything.

Any guidance on this would be helpful.

Musto Hary

unread,
Jan 24, 2018, 11:12:52 PM1/24/18
to django-oscar
I have same problem,...

Musto Hary

unread,
Jan 24, 2018, 11:43:07 PM1/24/18
to django-oscar
I resolved the problem with change tinymce version.

     {# We don't use a fallback for tinyMCE as it dynamically loads several other files #}
<!-- <script src="//cdn.tinymce.com/4/tinymce.min.js" type="text/javascript" charset="utf-8"></script>
         <script src="//cdn.tinymce.com/4/jquery.tinymce.min.js" type="text/javascript" charset="utf-8"></script> -->

    <script src="//cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.0/tinymce.min.js" type="text/javascript" charset="utf-8"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/tinymce/4.5.0/jquery.tinymce.min.js" type="text/javascript" charset="utf-8"></script>


Thomas Jost

unread,
Jan 25, 2018, 4:45:06 AM1/25/18
to django...@googlegroups.com
Same issue. Not sure if it's a change in TinyMCE or on my side (I just upgraded to Firefox dev edition 59), and I didn't want to force a specific TinyMCE version. So I added this in my own JS before loading TinyMCE:

    try {
        var w = global || window;
    }
    catch (e) {
        if (e instanceof ReferenceError) {
            window.global = window;
        }
    }

This works for me.

Best,
Thomas


--
https://github.com/tangentlabs/django-oscar
http://django-oscar.readthedocs.org/en/latest/
https://twitter.com/django_oscar
---
You received this message because you are subscribed to the Google Groups "django-oscar" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-oscar+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/django-oscar.
To view this discussion on the web, visit https://groups.google.com/d/msgid/django-oscar/a481af3e-29ab-41a9-80b2-ef4989fb503e%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Samir Shah

unread,
Jan 25, 2018, 9:41:09 PM1/25/18
to django-oscar
This is a bug in TinyMCE - there was a typo in packaged version released on their CDN - see https://github.com/tinymce/tinymce/issues/4171 .

It should be resolved once they push a fix to the CDN, which hopefully will be soon.
Reply all
Reply to author
Forward
0 new messages