fileupload.module claims to implement hook_execute
EliseVanLooij - April 21, 2008 - 16:23
| Project: | Drupal |
| Version: | 5.x-dev |
| Component: | documentation |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
The fileupload.module (http://api.drupal.org/api/file/developer/examples/fileupload.module/5) defines function fileupload_execute(&$node) which it claims is an implementation of hook_execute(). However, hook_execute does not exist. What is exist is drupal_execute($form_id, $form_values) which programmatically submits a form. That, however, is not at all what fileupload_execute does.

#1
You need to read up on hooks in Drupal. drupal_execute() and hook_execute() both exist and are both different things. fileupload.module does properly implement hook_execute(). Closing this issue.
#2
i cannot find hook_execute in api.drupal.org
???
#3
#39576: Replace execute with submit claims it be now submit
i would like to understand.
#4
Hm. I think boydjd is mistaken. I think the function should actually be hook_submit, and would be shocked if the code there is executing at all. See http://api.drupal.org/api/file/developer/hooks/node.php/5 for a list of node hooks.
#5
Btw, anyone with a CVS account can fix this example module. it's in contributions/docs/developer/examples.
#6
Also, our examples really ought to work. :P Bumping to critical.
#7
there are other issues in the code.
i will look into this soon.
>Also, our examples really ought to work. :P Bumping to critical.
+1 on this
#8
Changed the component to reflect the new component categorization. See http://drupal.org/node/301443
(not sure which version of D5 it belongs to)
#9
snufkin already fixed this.
--project followup subject--
Automatically closed -- issue fixed for two weeks with no activity.
#10
Automatically closed -- issue fixed for two weeks with no activity.