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

boydjd - April 24, 2008 - 05:12
Status:active» closed

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

aexl_konzepto.net - April 25, 2008 - 01:48
Status:closed» active

i cannot find hook_execute in api.drupal.org
???

#3

aexl_konzepto.net - April 25, 2008 - 01:50

#39576: Replace execute with submit claims it be now submit
i would like to understand.

#4

webchick - April 26, 2008 - 17:42

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

webchick - April 26, 2008 - 17:44

Btw, anyone with a CVS account can fix this example module. it's in contributions/docs/developer/examples.

#6

webchick - April 26, 2008 - 19:41
Priority:normal» critical

Also, our examples really ought to work. :P Bumping to critical.

#7

aexl_konzepto.net - April 30, 2008 - 15:35

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

heather - August 31, 2008 - 08:51
Project:Documentation» Drupal
Version:<none>» 5.x-dev
Component:Developer Guide» documentation

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

drumm - October 5, 2008 - 01:16
Status:active» fixed

snufkin already fixed this.

--project followup subject--

Anonymous (not verified) - October 19, 2008 - 01:24

Automatically closed -- issue fixed for two weeks with no activity.

#10

Anonymous (not verified) - October 19, 2008 - 01:32
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.