I was able to enable mobile_tools without a problem. However, when I attempted to enable mobile_tools_roles, I received the following error message:

Fatal error: Call to undefined function db_fetch_object() in /sites/all/modules/mobile_tools/mobile_tools_roles.module on line 28

This error prevents me from performing any action.

CommentFileSizeAuthor
#3 mobiletoolsfix-1139242-3.patch1.86 KBerynn

Comments

robotcake’s picture

same error here, the function does not and will not exist in drupal 7, I wonder if this release is a corrupt or old version because before upgrading the mobile tool 7 dev version does work but now this is not working anymore.

hansyg’s picture

I got this working via the information here...
http://drupal.org/update/modules/6/7#dbtng

After I got that working I found some other issues

In mobile_tools_roles.install, it doesn't look like the schemea is being installed. It is defined but never installed, so when you get it up and running you get a

Table '.mobile_tools_roles_relations' doesn't exist: SELECT COUNT(*) as count FROM {mobile_tools_roles_relations}; 

That can be fixed with a hook_install

/**
 * Implementation of hook_install()
 *
 */
function mobile_tools_roles_install() {
  drupal_install_schema('mobile_tools_roles');
}

Also in the same file the function mobile_tools_uninstall() should be named function mobile_tools_roles_uninstall()
It is conflicting with the function of the same name in the mobile_tools.install file.

Not sure how to proceed with this, maybe I should branch off and try and tackle some of these issues with the roles part of the module?

Let me know
~Hans

erynn’s picture

Status: Active » Needs review
StatusFileSize
new1.86 KB

I made a patch that fixes this as well as some other problems that I found from the lasted git version. It also fixes an error in mobiletools.module on line 823 as well as fixing the white bars that appeared on the top and bottom of a page. I have my localhost site up and working with this. Let me know if there is anything wrong with this.

tsssystems’s picture

@erynn

Thanks for the patch. Fatal error went away. Site I'm developing is on a remote testing server; I'm weeks away from using this, but I'll let you know how it goes...

robotcake’s picture

Thanks for the patch! Now no more fatal error, but did you successfully make the theme switching work? I have selected the switch theme Switch theme for a mobile device, but it doesn't switch theme on my iphone nor on the firefox using user agent addon> iphone 3.0. Not with drupal 7 (2.x-dev) nor with drupal 6 installation (2.x-dev) .

Actually I would like to set up two URL for mobile and browser site separately but I have limited info on how to do it, could you also share how to set up two URL with mobile tools? I suspect other than just create a folder in the site, it involved some multisite technique?

Any help is highly appreciated!!

erynn’s picture

Check here - http://drupal.org/node/1145944.
and here http://drupal.org/project/domain.
As for theme switching, make sure you have something detecting the user agent in the External Detection Modules tab. I am still trying to set up two different urls so I can't help too much yet.

twom’s picture

Assigned: Unassigned » twom
Status: Needs review » Needs work

Hi all,

The mobile_tools_roles module needs some major love for D7. I will start updating the code after the core mobile tools features are being done.

Mainly my goal is to report the D6 version of the mobile tools roles functionality, since the D6 version got several optimizations.

devin carlson’s picture

Status: Needs work » Closed (won't fix)

The 7.x-2.x branch of Mobile Tools in now unsupported.