WordPress.org

Forums

Ultimate TinyMCE
Cannot load wp-load.php on non standard install (10 posts)

  1. navitronic
    Member
    Posted 3 years ago #

    When including WordPress from within a separate sub directory, this plugin causes an error as it cannot include the wp-load.php when requiring it in style.php

    You should change line 1 of includes/style.php to read:

    <?php require_once( ABSPATH .'/wp-load.php'); ?>

    That should fix it.

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

  2. Josh
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    Fixed.

    Thank you VERY much!!

  3. navitronic
    Member
    Posted 3 years ago #

    Actually, I may have been wrong in my prior tip.

    It seems that ABSPATH is actually defined within wp-load.php! Oops.

    Which means that wp-load.php has already been included at that point.

    Meaning, I guess, that the require_once might be superfluous, unless that file is called in a different context somehow?

  4. Josh
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    What about this:

    // Hook into WordPress so we can use all the custom functions and global variables
    $file = dirname(__FILE__);
    $file = substr($file, 0, stripos($file, "wp-content") );
    // Require the file
    require( $file . "/wp-load.php");

    Did you get an error with the first code change? If so, do you remember what it was?

  5. navitronic
    Member
    Posted 3 years ago #

    First code change of updating that path didn't break anything, because at that point wp-load.php had already been included and defined ABSPATH.

    Meaning that the require statement isn't needed, unless that style.php file is called in a different context where wp-load.php might not have been included.

  6. Josh
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    My fault.. I see what you're saying.

    Okay, I'll remove it and make sure everything works properly.

    Thanks again.

  7. navitronic
    Member
    Posted 3 years ago #

    No worries, happy to help. :)

  8. Josh
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    Yep, removing the code still functions properly. I think I "grabbed" that file from one of my other directories.. and forgot to take out the top section.

    Anyways, all seems well now.

    You don't by any chance know javascript do you?

  9. navitronic
    Member
    Posted 3 years ago #

    I know enough to be dangerous, given half the chance.

    Having a problem?

  10. Josh
    Moderator and Editor Customizer
    Plugin Author

    Posted 3 years ago #

    lol... nice.

    Well, I'm trying to incorporate a drag and drop functionality into the plugin so that content editor buttons can be visually "placed"; rather than having to use those pain in the --- dropdown selectors.

    I have quite a bit of the foundation already setup... but it's with the specifics that I start to feel the headache. There are a few bugs and still a little more work to do on it.

    I can send you a beta version and you can take a look.... if you are interested. If so, send me an email using my contact form:
    http://joshlobe.com/contact-me/

Topic Closed

This topic has been closed to new replies.

About this Plugin

  • Ultimate TinyMCE
  • Frequently Asked Questions
  • Support Threads
  • Reviews

About this Topic

Tags

No tags yet.