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
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

Butte - September 17, 2008 - 14:32

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

Butte - October 2, 2008 - 18:54

Ok, i guess this module is not supported any more, and is dead ?

#3

SeroSero - October 3, 2008 - 09:01

It's not dead -- I'm just very busy at the moment, I'll organise a proper release when I have the time.

#4

Butte - October 3, 2008 - 14:03

Thanks for answer.
Sounds great, looking forward :)

#5

pinchg - October 6, 2008 - 21:01
Status:active» fixed

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

pinchg - October 6, 2008 - 21:02
Status:fixed» needs work

#7

Butte - October 7, 2008 - 10:18

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

Butte - October 7, 2008 - 14:03

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

pinchg - October 8, 2008 - 01:39

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

SeroSero - October 8, 2008 - 08:04

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

kjcole - January 9, 2009 - 00:22

Subscribe.

#12

lyricnz - September 13, 2009 - 21:34
Status:needs work» duplicate

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.

 
 

Drupal is a registered trademark of Dries Buytaert.