warning: Missing argument 1

DrupalMom - December 31, 2008 - 03:20
Project:Colorpicker
Version:6.x-1.0-beta1
Component:User interface
Category:support request
Priority:normal
Assigned:Unassigned
Status:needs work
Description

i am seeing the following pink status error:

warning: Missing argument 1 for colorpicker_example_menu() in /modules/colorpicker/examples/colorpicker_example.module on line 8.

did i not install this module correctly? please advise.

#1

Daniel A. Beilinson - January 1, 2009 - 19:06

I have same problem too... What is it?

#2

pbowe - January 1, 2009 - 21:04

It looks like the development snapshot has an updated colorpicker_example.module. I made the same changes to the colorpicker_example_menu() function and the error went away. The function should look like this:

function colorpicker_example_menu() {
$items[] = array(
'title' => t('Color Picker Example'),
'path' => 'colorpicker/example',
'description' => t('An example of the color picker in use.'),
'callback' => 'colorpicker_example_callback',
'access' => user_access('access colorpicker example')
);
return $items;
}

#3

skilip - January 2, 2009 - 07:17

the problem is caused by the $may_cache variable. In D6 isn't used anymore.

#4

skilip - January 2, 2009 - 07:54
Status:active» needs review
AttachmentSize
colorpicker_issue_352761.patch 631 bytes

#5

dwees - January 3, 2009 - 03:12
Status:needs review» needs work

This is exactly the problem, but the conditional function inside the hook_menu() is now unnecessary and should be removed as well.

Dave

#6

skilip - January 3, 2009 - 07:56

Oops, overlooked that one! You're right.

#7

kompressaur - March 1, 2009 - 22:31

Sorry i am experiencing the same problem. Forgive my ignorance but how would one go about applying that patch. hit me with it daddio i can take it. I aint scared of no code! (in the voice of ghostbusters)

Thanks

#8

skilip - March 3, 2009 - 06:20

Did you install the latest version of Colorpicker? It should have been fixed.

 
 

Drupal is a registered trademark of Dries Buytaert.