ATutor

Learning Management Tools







Pages:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15


Mobile Theme Fatal Error


  • 2014-10-24 12:16:55

    Mobile Theme Fatal Error

    The following fatal error is displayed when users try to access our site using a mobile device and when I try to preview the mobile theme on the themes tab under system preferences:

    Fatal error: Uncaught exception 'Exception' with message 'TeraWurflRemoteClient Error: Could not query Tera-WURFL master server.' in /hsphere/local/home/c372773/watccourses.com/ATutor/themes/mobile/include/TeraWurflRemoteClient.php:160 Stack trace: #0 /hsphere/local/home/c372773/watccourses.com/ATutor/themes/mobile/include/TeraWurflRemoteClient.php(99): TeraWurflRemoteClient->callTeraWurfl('http://wurfl.th...') #1 /hsphere/local/home/c372773/watccourses.com/ATutor/themes/mobile/include/header.tmpl.php(63): TeraWurflRemoteClient->getCapabilitiesFromAgent(NULL, Array, 'json') #2 /hsphere/local/home/c372773/watccourses.com/ATutor/include/classes/Savant2/Savant2.php(1325): include('/hsphere/local/...') #3 /hsphere/local/home/c372773/watccourses.com/ATutor/include/classes/Savant2/Savant2.php(1354): Savant2->fetch('include/header....') #4 /hsphere/local/home/c372773/watccourses.com/ATutor/include/header.inc.php(291): Savant2->display('include/header....') #5 /hsphere/local/home/c372773/watccourses.com/ATutor/mods/_core/themes/i in /hsphere/local/home/c372773/watccourses.com/ATutor/themes/mobile/include/TeraWurflRemoteClient.php on line 160

    Research indicates there is a patch to correct errors for the mobile theme. All of the patches ( #4848 and it's fixes, #4949 and #5337) in our patcher list have been installed. Where can I find the patch for the mobile theme.

    Will the patch correct this error?

    If not what is the next step?



    Our system Statistics & Information
    Database:
    5.72 MB
    Disk Usage:
    48.21 MB
    Courses:
    55
    Users:
    930
    ATutor Version:
    2.0.3(r11495 - 2011-09-13 13:27:29). Check Latest Version.
    PHP Version:
    5.2.17
    MySQL Version:
    5.1.68-community-log
    OS:
    Linux 2.6.18-371.3.1.el5xen

  • 2014-10-24 12:28:33

    Re: Mobile Theme Fatal Error

    There was not a patch for 2.0.3, but the one for version 2.1 should work, though you'd need to manually apply what's described in the patch.

    http://update.atutor.ca/patch/2_1/2_1-18/patch.xml

  • 2014-10-28 16:30:50

    Re: Mobile Theme Fatal Error

    We manually applied the patch. We are now getting a different error.

    This is the new error:
    Fatal error: Call to a member function getDeviceCapability() on a non-object in /hsphere/local/home/c372773/watccourses.com/ATutor/themes/mobile/include/header.tmpl.php on line 138


    This is line 131 - 141
    <script src="<?php echo $this->base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
    <script language="javascript" type="text/javascript">
    //<!--
    jQuery.noConflict();
    //-->
    </script>
    <script src="<?php echo $this->base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>
    <?php if (($wurflObj->getDeviceCapability("mobile_browser")=="Safari")): ?>

    <?php endif; ?>

    This is line 138:
    <?php if (($wurflObj->getDeviceCapability("mobile_browser")=="Safari")): ?>


    This is the patch we applied:
    //<patch><atutor_patch_id>18</atutor_patch_id><applied_version>2.1</applied_version><description>Correct problem with mobile/tablet theme not loading properly because TeraWurfl is no longer available</description><dependent_patches>

    // </dependent_patches><sql>
    // the patch comments out the following lines from require to the open/close found here: update.atutor.ca/patch/2_1/2_1-18/patch.xml
    // the patch manually applied 10.28.2014

    //$wurflObj = new TeraWurflRemoteClient('http://wurfl.thesedays.com/webservice.php');
    //$capabilities = array("product_info");
    //$data_format = TeraWurflRemoteClient::$FORMAT_JSON;
    //$wurflObj->getCapabilitiesFromAgent(null, $capabilities, $data_format);


    Lines 131 - 141 with line numbers
    131) <script src="<?php echo $this->base_path; ?>jscripts/infusion/InfusionAll.js" type="text/javascript"></script>
    132) <script language="javascript" type="text/javascript">
    133) //<!--
    134) jQuery.noConflict();
    135) //-->
    136) </script>
    137) <script src="<?php echo $this->base_path; ?>jscripts/ATutor.js" type="text/javascript"></script>
    138) <?php if (($wurflObj->getDeviceCapability("mobile_browser")=="Safari")): ?>
    139)
    140) <?php endif; ?>
    141)

  • 2014-10-28 17:39:24

    Re: Mobile Theme Fatal Error

    It would appear you are using a custom version of the mobile header template. Line 138 above does not exist in distribution version of the file.

    https://github.com/atutor/ATutor/blob/atutor_2_1/themes/mobile/include/header.tmpl.php#L138

    You might take a fresh copy of the file from the link above, then comment out lines line 59 to 63

    https://github.com/atutor/ATutor/blob/atutor_2_1/themes/mobile/include/header.tmpl.php#L59-L63

    Otherwise if you want to keep the custom version, remove lines 138 to 140.