documentcloud / wordpress-documentcloud

Embed DocumentCloud documents that won't be eaten by the visual editor
https://wordpress.org/plugins/documentcloud/
GNU General Public License v2.0
9 stars 14 forks source link

Inserting shortcode with widget triggers "tinyMCE.getInstanceById is not a function" error #23

Closed reefdog closed 9 years ago

reefdog commented 9 years ago
  1. Install and activate the plugin (natch)
  2. Go to a post
  3. Flip to Visual mode
  4. Click the DocumentCloud toolbar icon
  5. Add a URL and whatever
  6. Click "Insert"

What should happen: The shortcode composes and inserts into the content.

What happens: Widget seems to reload, console shows error: "Uncaught TypeError: tinyMCE.getInstanceById is not a function"

Unsure when this behavior started, but a clean installation of WP 3.9.1 and the plugin at 1b84674c6dd0a46d4db8d6879982eca5436aef9b still threw the error.

aschweigert commented 9 years ago

Probably when they updated to the new version of TinyMCE (3.8 or 3.9?), we had a similar issue with some other buttons from original Argo stuff to insert modules into the body of posts. I'll see if I can hunt down what the fix for that was...

eyeseast commented 9 years ago

That Argo stuff is really getting to be a long time ago.

aschweigert commented 9 years ago

Looks like we just moved that fix to another site and this is the relevant bit here: https://bitbucket.org/projectlargo/theme-lensnola/commits/2c8f0ca0669c/#Ljs/tinymce/plugins/largo/tinymce.jsT5

knowtheory commented 9 years ago

oh man, thanks for digging that up! (also, the lens is hosted up on bitbucket?)

aschweigert commented 9 years ago

we keep some of our child themes on bitbucket, but also their site is actually in a sandboxed WP instance because the code quality from the developers they worked with is...questionable.

reefdog commented 9 years ago

TinyMCE stuff yanked entirely. Will eventually try to add something similar back in, but tracking in #25.