-
-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Uncaught ReferenceError: django is not defined ( init_tinymce.js:38 ) #124
Comments
Does this fixes your issue? #108 or #102 (comment) |
Could you try last master, if it works for you I will make a bugfix release |
Natim, thank you for you answer. Tested master 27407b3 , but same error. |
I am having the same issue also using Django 1.8. I downgraded to Django-TinyMCE 1.5.2 as recommended by http://stackoverflow.com/questions/28643823/tinymce-for-django-is-not-loading-throwing-error-in-init 1.5.2 fixes the issue. |
Ok, it works with latest django-tinymce + a fix ( from master 27407b3)
|
I revert my commit, can you try current master? If it works I will release a new version of django-tinymce. |
Not sure about lives, but I pulled the current master; the code that was working with 1.5.2 stopped when I updated. The same "Uncaught ReferenceError: jQuery is not defined" issue. |
Working ok with master 4d6e78f , thanks. |
Ok let's release a bugfix release and see how it goes. |
@eson-schulz Make sure you include jQuery in your page and try https://github.com/aljosa/django-tinymce/releases/tag/2.0.3 |
I see this issue with django-tinymce 2.0.5. To repro:
Expected: TinyMCE awesomeness |
@Natim Has that bugfix been released? I have django-tinymce 2.0.5 and I'm still getting the "django is not defined" error; however, when I add the change from #108 it works correctly. I see that in commit 3f68de1, the fix was altered (this commit's change is reflected in the code I have that gives the error). I'm not sure if the fact I'm using an older version of Django (1.4.1) would cause an issue with this, but it seems like the issue was fixed and then unfixed. |
Is this working with django 1.8 and django-tinymce 2.0.5?? I am getting |
Does somebody want to fix this and file a PR? I will merge it and release 2.0.6. |
@Natim After further testing the change from #108 isn't perfect. The current version of init_tinymce.js, works with admin pages, but not with non-admin ones. After the reverting 3f68de1, the code works with non-admin pages, but not admin ones. Using your suggestion in #108 again makes only admin pages work. The following two versions of init_tinymce.js:38 make admin pages work, but not non-admin ones:
**Update:** I found a StackOverflow post (http://stackoverflow.com/a/10584539/4725574) that adding these files in your html template or to the form media works.
I also found that if you change |
Is the purpose of the django && django.jQuery to make sure that you use the jQuery version in the django namespace instead of the jQuery version pointed to by the global jQuery variable? Whether that's the case or not, this should work to replace
Although it's not pretty, I will create a PR with this version because it solves the issue for me and works on both admin and non-admin pages. |
A fix has been released as per django-tinymce 2.0.6 can you guys check it and validate that it fixes your problem? Thanks @mattarchie for fixing this. |
I just had a chance to try this out. Works great, thank you! |
Thank you for the feedback @hiltonc :) |
Django 1.8 and django-tinymce==2.1.0.dev0
Unable to use django-tinymce in custom forms.
Error : Uncaught ReferenceError: django is not defined ( init_tinymce.js:38 )
The "admin" test is ok, http://django-tinymce.readthedocs.org/en/latest/installation.html#testing
The text was updated successfully, but these errors were encountered: