Viewing 12 replies - 1 through 12 (of 12 total)
  • I have had the same problem on http://www.philsimon.com.

    Thread Starter EOSlover

    (@eoslover)

    philsimon, how did you solve it?

    I couldn’t.

    Thread Starter EOSlover

    (@eoslover)

    So what did you do? Do you still have the same problem?

    @philsimon: If you require assistance then, as per the Forum Welcome, please post your own topic instead of tagging onto someone else’s topic.

    Thread Starter EOSlover

    (@eoslover)

    @esmi, we have the same problem. πŸ™

    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.ww.wp.xz.cn/Forum_Welcome#Where_To_Post

    Thread Starter EOSlover

    (@eoslover)

    @esmi: you are correct. Sorry.

    I’m still experiencing the same problem.

    Plugin Author John Morris

    (@jtmorris)

    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. Resulting copy & paste dialog screenshot: 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

    (@eoslover)

    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

    (@jtmorris)

    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 – 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 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

    (@eoslover)

    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.