Download & Extend

fileupload.module claims to implement hook_execute

Project:Drupal core
Version:4.7.9
Component:documentation
Category:bug report
Priority:normal
Assigned:Unassigned
Status:closed (fixed)

Issue Summary

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.

Comments

#1

Status:active» closed (fixed)

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

Status:closed (fixed)» active

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

Priority:normal» critical

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

Project:Documentation» Drupal core
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

Status:active» fixed

snufkin already fixed this.

--project followup subject--

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

#10

Status:fixed» closed (fixed)

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

#11

Version:5.x-dev» 4.7.9
Priority:critical» normal
Status:closed (fixed)» active

Still there in the 4.7 doc. No longer critical as 4.7.x is no longer supported, though:

http://api.drupal.org/api/function/fileupload_execute/4.7

#12

Status:active» closed (fixed)

4.x is no longer supported