Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Call to undefined function url() in /var/www/vhosts/xxxs/sites/all/modules/mobile_tools/mobile_tools.module on line 531
In these lines:
//create the path and reassemble
$base = preg_replace('{/$}', '', variable_get('mobile_tools_mobile_url', ''));
$url = url($base . '/' . $_GET['q'], array('query' => $query));
return $url;
}
Comments
Comment #1
primus CreditAttribution: primus commentedGetting this same error, mainly when accessing an interior page directly without hitting the homepage.
Comment #2
twom CreditAttribution: twom commentedThx for submitting this major issue. I committed this fix to dev and will cut a release today!
Comment #3
sterndata CreditAttribution: sterndata commentedThanks!
Comment #4
sterndata CreditAttribution: sterndata commentedTesting with the 3/30 Devel version and have encountered no problems. Ready to release?
Comment #5
twom CreditAttribution: twom commentedThx for reporting that it works!
I am going to the most recent bug reports, and do a release today.
Tom
Comment #6
magicmarkker CreditAttribution: magicmarkker commentedany update on a release for this fix, I just recently downloaded 6.x-2.2 and I'm still getting the error
Comment #7
sterndata CreditAttribution: sterndata commentedUse the -dev version to get the fix.
Comment #8
bnicholo CreditAttribution: bnicholo commentedHello,
I loaded the most recent -dev version and it fixed 'undefined function url()' problem error, but now my links that have "?device=dekstop" appended to them stay in the mobile site and throw a page not found error.
Comment #9
venusrising CreditAttribution: venusrising commentedDoes anyone know if this has been totally fixed? Including #8?
Comment #10
venusrising CreditAttribution: venusrising commentedStill Broken
Tested Dev and some links get fixed others redirect in the url fine BUT goes to a page not found error. For instance, footer link going to oursite.com/about page brings page not found error.
Comment #11
venusrising CreditAttribution: venusrising commentedCan someone please comment on how we can make sure that static urls created on the site get appended with the subdomain like the rest of them. Some hardcoded urls do not work other menu items do, very weird and I cannot seem to figure out why.
Comment #12
sterndata CreditAttribution: sterndata commentedUpdated today and got the error again.
PHP Fatal error: Call to undefined function url() in /var/www/vhosts/breadboard.xxx.com/httpdocs/sites/all/modules/mobile_tools/mobile_tools.module on line 531, referer: http://m.xxx.com/
Comment #13
gdbassett CreditAttribution: gdbassett commentedStill having this problem, particularly with links mailed out. People receive them on their mobile devices and then cannot access them. They assume their mobile device is unsupported on the website and don't participate.
Comment #14
twom CreditAttribution: twom commented@sterndata I guess you have still the 2.2 release. On that release the url code is indeed on line 531. The 2.3 and dev releases should be fixed!
@venusrising Do you also get the undefined function url() error? If not, best to create a new issue with description of your symptoms!
Thanks all for the feedback! I hope you find time to upgrade to 2.3 or to dev in order to test.
Comment #15
venusrising CreditAttribution: venusrising commented@twom 1. We have regular current build on production site. We get 531 errors when clicking on things like footer links etc.
2. We have a sandbox site we installed the DEV version at but now the links go to the correct page BUT some links go to a page not found even if it goes to proper URL.
So, this means that DEV solves 531 Error BUT now shows page NOT FOUND for some links like hard coded footer and primary links.
Any suggestions?
Comment #16
sterndata CreditAttribution: sterndata commentedInstalling today's -dev version.
Comment #17
kat3_drx CreditAttribution: kat3_drx commentedHello twom,
Really, really stupid question here, but I'm getting the same error as described in the issue, running 6.x-2.2, and want to fix it, but I can't find where to get 6.x-2.3 to download and put on my site. Help, please?!
Comment #18
twom CreditAttribution: twom commentedNo stupid question... Good that you noticed that the 2.3 version was not put online. You can get it here http://drupal.org/node/1169008, but I'll make sure it is displayed correctly on the project homepage.
Comment #19
venusrising CreditAttribution: venusrising commentedSeems like current build solves alot of these issues
Comment #20
twom CreditAttribution: twom commentedGlad about that :)
Let me know if there are any other issues!
Comment #21
venusrising CreditAttribution: venusrising commented@twom Thanks for a great Module