Title: Insert Shortcode not working (Tweet This)
Last modified: August 30, 2016

---

# Insert Shortcode not working (Tweet This)

 *  Resolved [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/)
 * When I fill in all the text and info and click insert shortcode nothing happens.
   Why?
 * Also, here is the Console response.
    [http://tu.ubaci.me/vOv3Vx9t.jpg](http://tu.ubaci.me/vOv3Vx9t.jpg)
 * It looks like it’s all good, but there is nothing in the editor.

Viewing 12 replies - 1 through 12 (of 12 total)

 *  [philsimon](https://wordpress.org/support/users/philsimon/)
 * (@philsimon)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637778)
 * I have had the same problem on [http://www.philsimon.com](http://www.philsimon.com).
 *  Thread Starter [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637780)
 * philsimon, how did you solve it?
 *  [philsimon](https://wordpress.org/support/users/philsimon/)
 * (@philsimon)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637781)
 * I couldn’t.
 *  Thread Starter [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637782)
 * So what did you do? Do you still have the same problem?
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637783)
 * **[@philsimon](https://wordpress.org/support/users/philsimon/):** If you require
   assistance then, as per the [Forum Welcome](http://codex.wordpress.org/Forum_Welcome#Where_To_Post),
   please post your own topic instead of tagging onto someone else’s topic.
 *  Thread Starter [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637784)
 * [@esmi](https://wordpress.org/support/users/esmi/), we have the same problem.
   🙁
 *  [esmi](https://wordpress.org/support/users/esmi/)
 * (@esmi)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637785)
 * > Unless you are using the same version of WordPress on the same physical server
   > hosted by the same hosts with the same plugins, theme, and configurations as
   > the **original poster, ****do not** post in someone else’s thread. Start your
   > own topic.
 * [http://codex.wordpress.org/Forum_Welcome#Where_To_Post](http://codex.wordpress.org/Forum_Welcome#Where_To_Post)
 *  Thread Starter [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637786)
 * **[@esmi](https://wordpress.org/support/users/esmi/):** you are correct. Sorry.
 * I’m still experiencing the same problem.
 *  Plugin Author [John Morris](https://wordpress.org/support/users/jtmorris/)
 * (@jtmorris)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637792)
 * I’m sorry you’re encountering issues with this plugin.
 * For other users who have experienced this behavior in the past, this is a symptom
   of one of two potential problems.
 * The first is a plugin conflict. Try disabling plugins and seeing if the problem
   still occurs. Especially any plugins or themes that manipulate or modify the 
   WordPress editor (adding toolbar buttons, modifying behavior, et cetera). If 
   disabling a plugin fixes the problem, let me know the name of it, and I may be
   able to circumvent the interference.
 * —–
 * If disabling plugins does not work, then, unfortunately, this is a manifestation
   of a rare bug that has interfered with Tweet This for some time. For some users(
   and sometimes only intermittently), the WordPress editor is not accessible programatically,
   like it is supposed to be. This means that Tweet This can not insert the shortcode
   manually. For some users plagued by this, it is detectable and an error message
   results. For others, it’s not detectable and Tweet This fails. In your case, 
   it would be the latter.
 * I have spent dozens, if not hundreds of hours trying to remedy this rare problem,
   but I can not reproduce it, and it effects a tiny percentage of users. This makes
   it very difficult for me to work on it. Nearly every plugin update for the past
   year has included something aimed to resolving this issue, but each attempt is
   a shot in the dark, and I’ve only managed to reduce the number of users experiencing
   the problem a bit.
 * If you fall into this second problem category, I unfortunately have no quick 
   fix. You can tell Tweet This to display the shortcode for copying and pasting
   by changing the _“Insert Shortcode” Button Behavior_ setting under the Tweet 
   This’ settings page Shortcode Creator Dialog section. Setting Screenshot: [http://1drv.ms/1VT9GMd](http://1drv.ms/1VT9GMd).
   Resulting copy & paste dialog screenshot: [http://1drv.ms/1VTa4dv](http://1drv.ms/1VTa4dv).
   This will allow you to utilize the Shortcode Creator dialog box.
 * —–
 * I’m sorry if the suggestions above are not helpful, or do not resolve the problem.
 *  Thread Starter [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 8 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637815)
 * Hi **John Morris**,
 * Thank you for your reply. Yes, as things seem to be, I do fall into the latter
   category of the second of the two cases you mentioned.
 * I tried debugging it myself, I’ve spent 3-4 hours in the Console, trying to get
   it working. I deactivated all of the plugins, and still it wouldn’t work.
 * Do you have any other suggestion on how this bug can be resolved? I had an idea,
   to create a TinyMCE button, just like Bold or Italic that would wrap part of 
   the text into a tweet. That might not be the best solution, but it’s something
   of a solution.
 * Can I also offer one more piece of info. Is there a chance that the jQuery Mobile
   is colliding with TinyMCE, because its the only plugin running on jQuery Mobile.
   I know this might not be the culprit, but I thought to ask.
 *  Plugin Author [John Morris](https://wordpress.org/support/users/jtmorris/)
 * (@jtmorris)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637846)
 * Unfortunately, I don’t have any other suggestions other than switching the “Insert
   Shortcode” button behavior, at this time. It’s a currently ongoing investigation,
   but I have absolutely no idea what is causing the bug, and since I can’t replicate
   it, my ability to randomly try changes and observe the affect is severely stymied.
   As I said, I have put in dozens, if not hundreds of hours into this problem, 
   and still am when I can.
 * My latest, and so far unhelpful path to a solution is to look at the source code
   of other plugins with similar interactions and see if they do anything different.
   I have yet to find any plugins that do this in a manner I haven’t tried, and 
   none of them have visible bug reports indicating this problem that I can follow.
 * —–
 * I started writing a secondary plugin to do that wrapping that you mentioned, 
   but stopped as it will encounter the same issues as Tweet This. The WordPress
   editor (which is a modified TinyMCE editor) is supposed to provide a certain 
   JavaScript object when it has finished loading. Plugins, such as Tweet This, 
   are then supposed to use this JavaScript object to interact with the editor (
   by inserting content at the cursor location, in the case of Tweet This). ([source code for finding this object available here](https://github.com/jtmorris/tweet-this/blob/v1.6.2/assets/js/tinymce-dialog.js#L59)–
   lines 59 through 95).
 * To the best of my knowledge, this bug happens because that JavaScript object,
   for a small number of users, either isn’t there when it is supposed to be, or
   doesn’t contain the appropriate functions (both possibilities seem to occur).
 * Adding another toolbar button will encounter the same problem… the necessary 
   JavaScript object to do the wrapping in the editor isn’t there when it is supposed
   to be, or isn’t properly structured.
 * —–
 * It’s possible that jQuery Mobile is interfering… It does a number of strange 
   things to links and buttons, that might collide with Tweet This’ intended actions.
   However, Tweet This doesn’t use jQuery Mobile (it uses jQuery and jQuery UI, 
   but not jQuery Mobile).
 * For information, [here’s the part of the code](https://github.com/jtmorris/tweet-this/blob/v1.6.2/includes/setup.php#L69)
   that loads every jQuery item Tweet This uses in the admin dashboard.
 *     ```
       wp_enqueue_script( 'jquery' );
       wp_enqueue_script( 'jquery-ui-core' );
       wp_enqueue_script( 'jquery-ui-dialog' );
       wp_enqueue_script( 'jquery-ui-accordion' );
       ```
   
 * – and –
 *     ```
       //	jQuery UI theme.
       wp_enqueue_style('tt-admin-jquery-ui-css',
            TT_ROOT_URL . 'assets/css/jquery/cupertino-theme/jquery-ui.min.css',
            false
       );
       ```
   
 * If another plugin were using jQuery Mobile, then the problem should go away when
   Tweet This is the only active plugin. Unless your theme is using jQuery Mobile,
   and for some unknown reason loads it in the post editor.
 * Can you track down what is loading jQuery Mobile? Does this problem still occur
   if you use one of the default WordPress themes (TwentyFifteen, TwentyFourteen,
   or TwentyThirteen)? If it’s a free plugin or theme, I can install it in my testing
   environment and see if it causes the problem to appear for me, then determine
   a way to work around it. If jQuery Mobile ends up being at fault, it shouldn’t
   be too difficult to fix that.
 *  Thread Starter [EOSlover](https://wordpress.org/support/users/eoslover/)
 * (@eoslover)
 * [10 years, 7 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637858)
 * I’ve read your email. Since I’m in the middle of something I will have to post
   debug answers in a while. Thanks for the reply I will do my best to assist you
   in finding the bug.

Viewing 12 replies - 1 through 12 (of 12 total)

The topic ‘Insert Shortcode not working (Tweet This)’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/tweetthis_1a354f.svg)
 * [Tweet This](https://wordpress.org/plugins/tweetthis/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/tweetthis/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/tweetthis/)
 * [Active Topics](https://wordpress.org/support/plugin/tweetthis/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/tweetthis/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/tweetthis/reviews/)

 * 12 replies
 * 4 participants
 * Last reply from: [EOSlover](https://wordpress.org/support/users/eoslover/)
 * Last activity: [10 years, 7 months ago](https://wordpress.org/support/topic/insert-shortcode-not-working-tweet-this/#post-6637858)
 * Status: resolved