Support » Plugin: MobileChief - Mobile Site Builder » Fixing MobileChief for 3.5

  • 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” ) ) {

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • 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”

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

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

    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.

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

    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.

Viewing 6 replies - 1 through 6 (of 6 total)
  • The topic ‘Fixing MobileChief for 3.5’ is closed to new replies.