WordPress.org

Ready to get started?Download WordPress

Forums

Ultimate TinyMCE
[resolved] Shortcodes button (62 posts)

  1. Robert S
    Member
    Posted 1 year ago #

    Hi,

    I've been having an issue to get the shortcodes dropdown button to display in my editor.

    Problem persists even though I have done following:

    1) Tried in Firefox
    2) Tried in Chrome
    3) Cleared browser cache
    4) Disabled all plugins except for Ultimate TinyMCE
    5) Resetting plugin

    Also, if I enable Firebug on editor page - interestingly I get the following error:

    "invalid regular expression flag h
    http://www.mydomain.com/wp-content/plugins/ultimate-tinymce/shortcodes-editor-selector/editor_plugin.js.php?ver=349-20805
    Line 2"

    Any ideas anyone?

    Cheers,

    http://wordpress.org/extend/plugins/ultimate-tinymce/

  2. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Hello Robert,

    I have received a few messages reporting the same issue. I believe WP has changed something regarding shortcodes in the new version.

    What's funny.. is it works fine on all my test installs.

    I'm not sure if it's theme related, plugin related, or WP related.

    I'll have to do some testing to dig deeper.

    What theme are you using out of curiosity?

  3. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    Thanks for responding.

    I just checked a couple of my sites and on one shortcode button shows OK and on the other it does not. Both installs are at latest WP 3.4.1 and both use different themes but from same framework/author (xScape framework). I'm happy to do further testing for you if needed - just let me know what to do.

    Cheers,

  4. Robert S
    Member
    Posted 1 year ago #

    Hi,

    Interestingly, on the site where it does not show - if I revert this site's theme back to default 2011 - then shortcode button still does not show in editor. Bizarre!

    Further to that - if I disable all plugins - except for yours - reset your plugin back to defaults - the shortcode button still does not work. Amazing!

    Going to be a hard one to crack.

    Regards,

  5. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Hmmmm..... regarding the two sites:

    1. Are they hosted at the same location?
    2. Are they both single-site installations?
    3. Are they both in root directories? (as opposed to one being in a subdirectory?)

    Thanks for helping!!

  6. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    1. Sites are both hosted at same location and both have same IP address.
    2. Yep... both are single site installs.
    3. Yep... both sites installed in the root of pubic_html directory

    Does not really help does it. My guess is you are looking for a difference between a site that works and one that doesn't.

    Keep the suggestions coming.

  7. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Are they using the same theme?

    Try this (if you dare) ;)

    1. Open the ultimate-tinymce/shortcodes-editor-select/editor_plugin.js.php file.

    2. On lines 2 and 3, find the code:

    require_once('../../../../wp-admin/admin.php');
    require_once('../../../../wp-admin/includes/admin.php');

    and replace with this:

    require_once (ABSPATH . '/wp-admin/admin.php');
    require_once (ABSPATH . '/wp-admin/includes/admin.php');
  8. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Wait.. that won't work...

    Gimme a minute...

  9. Robert S
    Member
    Posted 1 year ago #

    You are right... it didn't - with the code change - no bar displayed at all.

  10. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Man.. I have to run out for a little bit. I've been putting off giving my buddy a ride.

    I'm gonna have to leave shortly.

    But, I'm excited because of your first message. You identified where the incorrect code might be coming from... and I've had about 20 emails from people asking about this.

    So, I'll be eager to get back on it when I return home.

    Thanks again, and I'll post something new for you to try when I'm ready.

  11. Robert S
    Member
    Posted 1 year ago #

    No worries Josh. I know what it's like to have to drag my self away from work. So far you have been most helpful and no probs to continue assisting / testing.

    Cheers,

  12. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Okay, I'm back on this now. I'll be back soon to give you a new code to try. Thanks for sticking with this!

    EDIT: What are the shortcodes you see in the installation where it's NOT working properly?

    Do you see any error message on or around the tinymce editor window when you are on the create/edit post/page screen?

  13. Robert S
    Member
    Posted 1 year ago #

    No worries Josh. In your on time.

  14. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Okay, let's try replacing this:

    require_once('../../../../wp-admin/admin.php');
    require_once('../../../../wp-admin/includes/admin.php');

    With this:

    if ( defined('ABSPATH') ) {
         require_once(ABSPATH . '/wp-admin/admin.php');
         require_once(ABSPATH . '/wp-admin/includes/admin.php');
    } else {
         require_once('../../../../wp-admin/admin.php');
         require_once('../../../../wp-admin/includes/admin.php');
    }
  15. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    No luck mate.

    1) Replaced the code.
    2) Cleared browser cache.
    3) Re-saved plugin options ("Shortcodes" enabled).
    4) Plugin rows showing OK in editor but no Shortcode button unfortunately. Interesting that the Styles button does display.
    5) Same error in Firebug:

    "invalid regular expression flag h
    http://www.kuakawa.biz/wp-content/plugins/ultimate-tinymce/shortcodes-editor-selector/editor_plugin.js.php?ver=349-20805
    Line 2"

    I remain on standby for further testing.

    Cheers,

  16. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    It still shows the error in line 2? I figured if any error, it would have jumped to line 6 or 7.

    I think the button should have at least shown up also...

    Hmmm... do you have any cache plugin on your wordpress? Did you try hitting ctrl+f5 to refresh the page?

    EDIT:

    Do you know how to edit your wp-config file? If you do, on the site where the button is not working, add this to the wp-config.php file:

    define('WP_DEBUG', true);

    Or, if it's already in there, just change false to true.

    Now, go back to the editor and see if any warnings appear.

  17. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Then... here is my next attempt...

    Again, going back to the beginning...

    Replace this:

    require_once('../../../../wp-admin/admin.php');
    require_once('../../../../wp-admin/includes/admin.php');

    With this:

    $parse_uri = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
    $parse_uri2 = explode( 'wp-content', $_SERVER['SCRIPT_FILENAME'] );
    require_once( $parse_uri[0] . 'wp-admin/admin.php' );
    require_once( $parse_uri2[0] . 'wp-admin/includes/admin.php' );
  18. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    I'm OK with the WP debugger.
    Will get debug output from last lot of code (your previous response).

    Cheers,

    Rob

  19. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    Still no go with latest code.
    Will send you soem debug stuff.

    Cheers,

    R

  20. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    Not seeing any WP specific errors.
    Note that I use GD Press Tools plugin which has a neat feature for showing a while range of debug stuff on any screen (backend or frontend).

    If you want a specific file emailed to you let me know.

    I'll check that firebug error again.

    R

  21. Robert S
    Member
    Posted 1 year ago #

    Hi,

    If I click on this error in Firebug:

    "invalid regular expression flag h
    http://www.kuakawa.biz/wp-content/plugins/ultimate-tinymce/shortcodes-editor-selector/editor_plugin.js.php?ver=349-20805
    Line 2"

    ...it opens up following file (can't see a way to attach). Here's a dropbox link to file:
    https://dl.dropbox.com/u/27824132/editor_plugin.js.php

    Regards,

    R

  22. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Yeah, that's the file we are working on with the code from above.

    Okay, will you send me the login info for the site that's not working?

    You can send it securely here:
    http://www.joshlobe.com/contact-me/

    Also, if you have FTP access to the same site, that would be fantastic.

    I'm gonna be fairly busy for the next day or two... but this is a priority for me. So, any free time I get, I'll be working on this.

  23. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    Updated to 2.7 and issue with shortcodes button not displaying remains an issue.

    Regards,

  24. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Dangit!

    Okay, can you list the shortcodes that you DO see in the dropdown?

    Then, can you try to remember a few that you had which are not there now?

    Thanks.

  25. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    The problem is I do not see any shortcodes.
    I don't even get the shortcodes button in the editor!

  26. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    I'm working on a completely new shortcodes interface. It's been a pain in the A**!!

    But, it's close. It'll be slightly different... you'll get a popup window with a list of all available shortcodes with a radio button selection interface. Select which shortcode you want to insert, and it'll do the rest.

    I only wish I knew javascript as much as I know php :)

    So... a few more days.

  27. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    Appreciate the heads up.
    Let me know of you want me to do any testing.

    Sorry, can't help you with the js.

    Cheers,

  28. Josh (WP Edit)
    Member
    Plugin Author

    Posted 1 year ago #

    Okay...

    New Shortcodes button in version 2.8.

    Let me know how it works for you.

  29. Robert S
    Member
    Posted 1 year ago #

    Hi Josh,

    You been burning the midnight oil mate?
    Appreciate you pursuing this problem. 2.8 downloaded and tested:

    1) I think you cracked it! well almost...
    2) Error appears inside and top of shortcode pop-up selection panel:

    "Notice: Undefined offset: 1 in ****/public_html/wp-includes/vars.php on line 28:"

    Cheers,

  30. aaanadie
    Member
    Posted 1 year ago #

    I have WP 3.4.1 with Ultimate TinyMCE 2.7, the shortcodes button was working ok, but I updated to 2.8 today and shortcodes button stopped working (when I press shortcodes button only got a blank window).
    I uninstalled, deleted and reinstalled Ultimate TinyMCE 2.8 but still the issue.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic