WordPress.org

Ready to get started?Download WordPress

Forums

MobileChief - Mobile Site Builder
Fixing MobileChief for 3.5+ (7 posts)

  1. MamboTuna
    Member
    Posted 1 year ago #

    When I tried MobileChief on sites running WP 3.5 and higher (not listed as tested by the plugin authors), much of the functionality was missing. After digging a bit, I found several errors being generated about missing functions (Call to undefined function ...) in the various error_log files in the plugin directories. For my use this included the standard WP functions plugin_dir_url, add_action and add_filter.

    Adding the following to include the WP environment near the top of mobilechief-mobile-site-creator.php seems to have greatly improved things for me.

    for ( $i = 0; $i < $depth = 10; $i++ ) {
    $wp_root_path = str_repeat( '../', $i );
    if ( file_exists("{$wp_root_path}wp-load.php" ) ) {
    require_once("{$wp_root_path}wp-load.php");
    }
    }

    Posting in the hopes that this might help someone else trying to use this plugin on WP 3.5+. Let me know if you find a better solution.

    http://wordpress.org/extend/plugins/mobilechief-mobile-site-creator/

  2. myvote
    Member
    Posted 1 year ago #

    Hello, thank you for your information. Could you please tell me "where" in mobilechief-mobile-site-creator.php, because I am still having the same problem:

    "Fatal error: Cannot use object of type WP_Error as array in C:\Program Files\Ampps\www\wp\wp-content\plugins\mobilechief-mobile-site-creator\functions\re-usable-functions.php on line 1252"

  3. MamboTuna
    Member
    Posted 1 year ago #

    I inserted this before any other functional code. Line 76 worked in my version of the file.

  4. myvote
    Member
    Posted 1 year ago #

    Thank you, but it didn't work for me.

  5. MamboTuna
    Member
    Posted 1 year ago #

    Hmm. What this code is doing is finding wp-load.php which moved between WordPress versions. This loads some common information about WordPress environment etc. The loop checks up to 10 levels higher in the tree but doesn't descend into any folders or look outside the containing tree.

    Can you find wp-load.php in your environment? If it is located elsewhere, relative to your mobilechief install, then that might give you a clue on how to modify my work-around.

  6. myvote
    Member
    Posted 1 year ago #

    It is in my default directory: C:\Program Files\Ampps\www\wp

  7. MamboTuna
    Member
    Posted 1 year ago #

    I would expect the loop to work as long as your mobilechief install is somewhere under the same C:\Program Files\Ampps\www\wp and less than 10 folders deep. I haven't tried this on Windows but I wouldn't expect the path separators ("/" on unix/linux vs "\" on Windows) to matter in this case. I suppose you could be having a different issue with similar symptoms.

Topic Closed

This topic has been closed to new replies.

About this Plugin

About this Topic