We build. You grow.

Get best community software here

Start a social network, a fan-site, an education project with oxwall - free opensource community software

Site won't load on mobile[Solved] | Forum

Elizabeth
Elizabeth Jun 26 '15
So I was in my FTP and saw my error log sitting in there and transferred it over. It looks like this is the problem:

[26-Jun-2015 10:44:02 US/Pacific] PHP Fatal error:  Class 'BASE_MCLASS_EventHandler' not found in /home/bgcco/public_html/ow_system_plugins/base/mobile/init.php on line 83

This is the code from line 70 down in that file:

// Drag And Drop panels
$router->addRoute(new OW_Route('base_member_dashboard', 'dashboard', 'BASE_CTRL_ComponentPanel', 'dashboard'));
$router->addRoute(new OW_Route('base_member_dashboard_customize', 'dashboard/customize', 'BASE_CTRL_ComponentPanel', 'dashboard', array(
        'mode' => array(OW_Route::PARAM_OPTION_HIDDEN_VAR => 'customize'
        ))));

$router->addRoute(new OW_Route('base_member_profile_customize', 'my-profile/customize', 'BASE_CTRL_ComponentPanel', 'myProfile', array(
        'mode' => array(OW_Route::PARAM_OPTION_HIDDEN_VAR => 'customize'
        ))));

$router->addRoute(new OW_Route('base_index_customize', 'index/customize', 'BASE_CTRL_ComponentPanel', 'index', array(
        'mode' => array(OW_Route::PARAM_OPTION_HIDDEN_VAR => 'customize'
        ))));

$router->addRoute(new OW_Route('base_index', 'index', 'BASE_CTRL_ComponentPanel', 'index'));
$router->addRoute(new OW_Route('base_member_profile', 'my-profile', 'BASE_CTRL_ComponentPanel', 'myProfile'));

$router->addRoute(new OW_Route('base_user_profile', 'user/:username', 'BASE_CTRL_ComponentPanel', 'profile'));
$router->addRoute(new OW_Route('base_page_404', '404', 'BASE_CTRL_BaseDocument', 'page404'));
$router->addRoute(new OW_Route('base_page_403', '403', 'BASE_CTRL_BaseDocument', 'page403'));
$router->addRoute(new OW_Route('base_page_auth_failed', 'authorization-failed', 'BASE_CTRL_BaseDocument', 'authorizationFailed'));
$router->addRoute(new OW_Route('base_page_splash_screen', 'splash-screen', 'BASE_CTRL_BaseDocument', 'splashScreen'));
$router->addRoute(new OW_Route('base_page_alert', 'alert-page', 'BASE_CTRL_BaseDocument', 'alertPage'));
$router->addRoute(new OW_Route('base_page_confirm', 'confirm-page', 'BASE_CTRL_BaseDocument', 'confirmPage'));
$router->addRoute(new OW_Route('base_page_install_completed', 'install/completed', 'BASE_CTRL_BaseDocument', 'installCompleted'));

$router->addRoute(new OW_Route('base_delete_user', 'profile/delete', 'BASE_CTRL_DeleteUser', 'index'));
$router->addRoute(new OW_Route('base.reset_user_password', 'reset-password/:code', 'BASE_CTRL_User', 'resetPassword'));
$router->addRoute(new OW_Route('base.reset_user_password_request', 'reset-password-request', 'BASE_CTRL_User', 'resetPasswordRequest'));
$router->addRoute(new OW_Route('base.reset_user_password_expired_code', 'reset-password-code-expired', 'BASE_CTRL_User', 'resetPasswordCodeExpired'));

$router->addRoute(new OW_Route('base_billing_completed', 'order/:hash/completed', 'BASE_CTRL_Billing', 'completed'));
$router->addRoute(new OW_Route('base_billing_completed_st', 'order/completed', 'BASE_CTRL_Billing', 'completed'));
$router->addRoute(new OW_Route('base_billing_canceled', 'order/:hash/canceled', 'BASE_CTRL_Billing', 'canceled'));
$router->addRoute(new OW_Route('base_billing_canceled_st', 'order/canceled', 'BASE_CTRL_Billing', 'canceled'));
$router->addRoute(new OW_Route('base_billing_error', 'order/incomplete', 'BASE_CTRL_Billing', 'error'));

$router->addRoute(new OW_Route('base_preference_index', 'profile/preference', 'BASE_CTRL_Preference', 'index'));

$router->addRoute(new OW_Route('base_user_privacy_no_permission', 'profile/:username/no-permission', 'BASE_CTRL_ComponentPanel', 'privacyMyProfileNoPermission'));

$router->addRoute(new OW_Route('base-api-server', 'api-server', 'BASE_CTRL_ApiServer', 'request'));
$router->addRoute(new OW_Route('base.robots_txt', 'robots.txt', 'BASE_CTRL_Base', 'robotsTxt'));

$router->addRoute(new OW_Route('base.complete_account_type', 'fill/account_type', 'BASE_CTRL_CompleteProfile', 'fillAccountType'));
$router->addRoute(new OW_Route('base.complete_required_questions', 'fill/profile_questions', 'BASE_CTRL_CompleteProfile', 'fillRequiredQuestions'));

$router->addRoute(new OW_Route('base.moderation_flags', 'moderation/flags/:group', 'BASE_CTRL_Moderation', 'flags'));
$router->addRoute(new OW_Route('base.moderation_flags_index', 'moderation/flags', 'BASE_CTRL_Moderation', 'flags'));
$router->addRoute(new OW_Route('base.moderation_tools', 'moderation', 'BASE_CTRL_Moderation', 'index'));


OW_ViewRenderer::getInstance()->registerFunction('display_rate', array('BASE_CTRL_Rate', 'displayRate'));

$eventHandler = new BASE_CLASS_EventHandler();
$eventHandler->init();

//OW::getRegistry()->setArray('users_page_data', array());
BASE_CLASS_ConsoleEventHandler::getInstance()->init();
BASE_CLASS_InvitationEventHandler::getInstance()->init();

=================================================

this is way out of my area. anyone know what we're looking at here? :D
The Forum post is edited by Elizabeth Jun 26 '15
James Geddes
James Geddes Jun 26 '15
I would strongly suggest disabling the mobile version all together. It's rubbish.
Elizabeth
Elizabeth Jun 26 '15
I prefer to get it fixed. Sorry, I put the wrong init.php code in. That was for the desktop. This is for mobile and line 83 is 3rd from last (86 lines total):

<?php

/**
 * EXHIBIT A. Common Public Attribution License Version 1.0
 * The contents of this file are subject to the Common Public Attribution License Version 1.0 (the “License”);
 * you may not use this file except in compliance with the License. You may obtain a copy of the License at
 * http://www.oxwall.org/license. The License is based on the Mozilla Public License Version 1.1
 * but Sections 14 and 15 have been added to cover use of software over a computer network and provide for
 * limited attribution for the Original Developer. In addition, Exhibit A has been modified to be consistent
 * with Exhibit B. Software distributed under the License is distributed on an “AS IS” basis,
 * WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License for the specific language
 * governing rights and limitations under the License. The Original Code is Oxwall software.
 * The Initial Developer of the Original Code is Oxwall Foundation (http://www.oxwall.org/foundation).
 * All portions of the code written by Oxwall Foundation are Copyright (c) 2011. All Rights Reserved.

 * EXHIBIT B. Attribution Information
 * Attribution Copyright Notice: Copyright 2011 Oxwall Foundation. All rights reserved.
 * Attribution Phrase (not exceeding 10 words): Powered by Oxwall community software
 * Attribution URL: http://www.oxwall.org/
 * Graphic Image as provided in the Covered Code.
 * Display of Attribution Information is required in Larger Works which are defined in the CPAL as a work
 * which combines Covered Code or portions thereof with code not governed by the terms of the CPAL.
 */
$autoloader = OW::getAutoloader();
$autoloader->addPackagePointer('MBOL', OW_PluginManager::getInstance()->getPlugin('base')->getMobileBolDir());

$router = OW::getRouter();

$router->addRoute(new OW_Route('base.not_available_in_this_context', 'not-available', 'BASE_MCTRL_BaseDocument', 'notAvailable'));
$router->addRoute(new OW_Route('base.desktop_version', 'desktop-version', 'BASE_MCTRL_BaseDocument', 'redirectToDesktop'));
$router->addRoute(new OW_Route('static_sign_in', 'sign-in', 'BASE_MCTRL_User', 'standardSignIn'));
$router->addRoute(new OW_Route('sign_in', 'sign-in', 'BASE_MCTRL_User', 'standardSignIn')); //TODO find usage and remove
$router->addRoute(new OW_Route('base_sign_out', 'sign-out', 'BASE_CTRL_User', 'signOut'));
$router->addRoute(new OW_Route('base_user_profile', 'user/:username', 'BASE_MCTRL_User', 'profile'));
$router->addRoute(new OW_Route('base_about_profile', 'about/:username', 'BASE_MCTRL_User', 'about'));
$router->addRoute(new OW_Route('base_page_404', '404', 'BASE_MCTRL_BaseDocument', 'page404'));
$router->addRoute(new OW_Route('base_page_403', '403', 'BASE_MCTRL_BaseDocument', 'page403'));
$router->addRoute(new OW_Route('base_page_auth_failed', 'authorization-failed', 'BASE_MCTRL_BaseDocument', 'authorizationFailed'));
$router->addRoute(new OW_Route('base_page_splash_screen', 'splash-screen', 'BASE_MCTRL_BaseDocument', 'splashScreen'));
$router->addRoute(new OW_Route('base_email_verify', 'email-verify', 'BASE_MCTRL_EmailVerify', 'index'));
$router->addRoute(new OW_Route('base_email_verify_code_form', 'email-verify-form', 'BASE_MCTRL_EmailVerify', 'verifyForm'));
$router->addRoute(new OW_Route('base_email_verify_code_check', 'email-verify-check/:code', 'BASE_MCTRL_EmailVerify', 'verify'));
$router->addRoute(new OW_Route('base_forgot_password', 'forgot-password', 'BASE_MCTRL_User', 'forgotPassword'));
$router->addRoute(new OW_Route('base.reset_user_password', 'reset-password/:code', 'BASE_MCTRL_User', 'resetPassword'));
$router->addRoute(new OW_Route('base.reset_user_password_request', 'reset-password-request', 'BASE_MCTRL_User', 'resetPasswordRequest'));
$router->addRoute(new OW_Route('base.reset_user_password_expired_code', 'reset-password-code-expired', 'BASE_MCTRL_User', 'resetPasswordCodeExpired'));

// Drag And Drop panels
$router->addRoute(new OW_Route('base_member_dashboard', 'dashboard', 'BASE_MCTRL_WidgetPanel', 'dashboard'));
$router->addRoute(new OW_Route('base_index', 'index', 'BASE_MCTRL_WidgetPanel', 'index'));
//$router->addRoute(new OW_Route('base_user_profile', 'user/:username', 'BASE_MCTRL_WidgetPanel', 'profile'));

$router->addRoute(new OW_Route('users', 'users', 'BASE_MCTRL_UserList', 'index', array('list' => array(OW_Route::PARAM_OPTION_HIDDEN_VAR => 'latest'))));
$router->addRoute(new OW_Route('base_user_lists', 'users/:list', 'BASE_MCTRL_UserList', 'index'));
$router->addRoute(new OW_Route('base_user_lists_responder', 'responder', 'BASE_MCTRL_UserList', 'responder'));

$router->addRoute(new OW_Route('base_join', 'join', 'BASE_MCTRL_Join', 'index'));

$router->addRoute(new OW_Route('base.complete_account_type', 'fill/account_type', 'BASE_MCTRL_CompleteProfile', 'fillAccountType'));
$router->addRoute(new OW_Route('base.complete_required_questions', 'fill/profile_questions', 'BASE_CTRL_MCompleteProfile', 'fillRequiredQuestions'));

$owBasePlugin = OW::getPluginManager()->getPlugin('base');

$themeManager = OW::getThemeManager();
$baseDecorators = array('box_cap', 'box', 'button', 'paging', 'avatar_item', 'tooltip', 'box_toolbar', "floatbox", "ic");

foreach ( $baseDecorators as $name )
{
    $themeManager->addDecoratorPath($name, $owBasePlugin->getMobileDecoratorDir() . $name . '.html');
}

$classesToAutoload = array(
    'BASE_Members' => $owBasePlugin->getCtrlDir() . 'user_list.php',
    'BASE_MenuItem' => $owBasePlugin->getCmpDir() . 'menu.php',
    'BASE_CommentsParams' => $owBasePlugin->getCmpDir() . 'comments.php',
    'BASE_ContextAction' => $owBasePlugin->getCmpDir() . 'context_action.php'
);

OW::getAutoloader()->addClassArray($classesToAutoload);

BASE_MCLASS_ConsoleEventHandler::getInstance()->init();

$baseEventHandler = new BASE_MCLASS_EventHandler();
$baseEventHandler->init();

BASE_CLASS_InvitationEventHandler::getInstance()->genericInit();


Elizabeth
Elizabeth Jun 26 '15
What's really bizarre is between June 19th and today, I've had 10,000 of these fatal errors in my error log, so something weird is going on. I have 10,800 lines of fatal errors and starting from 455, every one is the problem with the init.php file for mobile. They started 7 pm Pacific time and I was in Rhodes, Greece that morning (would be the 20th) so I wasn't making changes to the site while I was away.

Anyone understand the code enough to even understand the problem?
Elizabeth
Elizabeth Jun 26 '15
Wow. So I solved it! Really crazy and I don't think anyone could have figured this out for me given where the problem was. But thank you, Bobbi, for getting me to the error log to find the problem. Now I know where to go next time.

So...I ended up looking through each file to match it up with the original script. Amazingly, for whatever reason, the base/mobile/classes/eventhandler.php file was there but read 0 bytes. The original read 26kb. No idea how this happened but once I replaced the file, the mobile side started working.

So thank you for those who tried to help and did help. That was kind of a needle in a haystack but Bobbi pointed me to which haystack to look in. ;)
ross Team
ross Jun 28 '15
Thanks for letting us know the reason and solution of the issue. I'm going to mark this thread as Solved then. 
Pages: « 1 2