Missing argument
Butte - September 17, 2008 - 13:14
| Project: | GeoNames |
| Version: | 6.x-2.x-dev |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | duplicate |
Jump to:
Description
Hi
when enableing the Tools in Modules, i get the following error :
warning: Missing argument 1 for geonames_tools_menu() in /web/www.mysite.com/www/drupal/sites/all/modules/geonames/geonames_tools.module on line 7.
Im a noob and have no clue what that means.
Also the Documentation link does not work.
Thanks for helping.

#1
this is for version 6.x-1.1
Ohh and i see that there is already an request for this, sorry for dublicating.
But i also see that the other topic is kind of old. Is this module still supported ?
Thanks for any answer.
#2
Ok, i guess this module is not supported any more, and is dead ?
#3
It's not dead -- I'm just very busy at the moment, I'll organise a proper release when I have the time.
#4
Thanks for answer.
Sounds great, looking forward :)
#5
Open geonames_module.tools and go to line 7 - remove the "$may_cache" parameter, then in the if clause 2 or 3 lines down change the "$may_cache" to a 0. This is a hack but it works.
#6
#7
Thanks for answer Pinchg.
Im a noob, so i have difficult understanding what you write. Can you explain, what need to be changed below, please. Thanks.
function geonames_tools_menu($may_cache) {
$items = array();
if ($may_cache) {
}
else {
$items[] = array(
'path' => 'geonames/autocomplete',
'title' => t('Autocomplete Geonames Search'),
'type' => MENU_CALLBACK,
'callback'=> 'geonames_tools_search_autocomplete',
'access' => user_access('access content')
);
}
return $items;
}
#8
I see that work is in progress. I will not hack, but wait patiently for a official update.
Looking forward to see this project grow :) Thanks for the module and hard work.
#9
Make it look like this: (if you're a noob then you probably will have trouble implementing this api - just a thought - its not a miracle drag and drop module!)
function geonames_tools_menu() {
$items = array();
if (1) {
}
#10
For D6 it is supposed to look like this:
function geonames_tools_menu() {$items['geonames/autocomplete'] = array(
'title' => t('Autocomplete Geonames Search'),
'page callback' => 'geonames_tools_search_autocomplete',
'access arguments' => array('access content'),
'type' => MENU_CALLBACK,
);
return $items;
}
#11
Subscribe.
#12
Duplicate of #257384: warning: Missing argument 1 for geonames_tools_menu() ... tools.module on line 7.. 6.x-2.x-dev branch not in use at this time.