[development] a (probably) simple question w.r.t. drupal_execute

Aaron Winborn winborn at advomatic.com
Sat Mar 7 13:44:05 UTC 2009


You could also use module_load_include('inc', 'uc_attribute', 'uc_attribute.admin');


----- Original Message -----
From: "Matt Funk" <matze999 at gmx.net>
To: development at drupal.org
Sent: Friday, March 6, 2009 6:59:05 PM GMT -05:00 US/Canada Eastern
Subject: Re: [development] a (probably) simple question w.r.t. drupal_execute


well, to answer my own question, i guess i had to do a 
include_once(drupal_get_path('module', 'uc_attribute'). '/uc_attribute.admin.inc');

in the module file in order to have access to that form. It looks like it 
works now.

is it better to post stuff on drupal.org than on this list?


On Friday 06 March 2009, Matt Funk wrote:
> Hi,
> i am pretty new at developing stuff in Drupal. So this question is probably
> an easy one to answer, but i am still new enough that i don't even really
> know where to look to start the debugging process. And i am hoping this is
> the correct list to post to.
> Anyway, here's the question:
> I am simply trying to programmatically create an attribute for ubercart
> (ver2). As far as i can tell drupal_execute seems the easiest (and
> intended?) way to do this.
> So i create my $form_state array etc...
> Then $form_id = 'uc_attribute_form';
> When i put that into the module and the menu callback is executed i get:
> ...
> warning: call_user_func_array() [function.call-user-func-array]: First
> argument is expected to be a valid callback, 'uc_attribute_form' was given
> in /home/content/x/p/d/xpdtek/html/drupal-6.10/includes/form.inc on line
> 366. ...
> So apparently i am not quite getting something here. My first guess is that
> the form_id is wrong. But uc_attributes is enabled and from what i can tell
> the form that lets me manually create an attribute is called
> uc_attribute_form (located in uc_attribute/uc_attribute.admin.inc).
> Can anyone shed some light on this for me ...
> thanks
> matt

More information about the development mailing list