Posted by antgiant on February 3, 2009 at 4:29pm
| Project: | Drupal core |
| Version: | 7.x-dev |
| Component: | trigger.module |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed (duplicate) |
| Issue tags: | trigger |
Issue Summary
The documentation for hook_hook_info states that the return value should be:
Return value
- A nested array. The outermost key defines the module that the triggers are from. The menu system will use the key to look at the .info file of the module and make a local task (a tab) in the trigger UI.
- The next key defines the hook being described.
- Inside of that array are a list of arrays keyed by hook operation.
- Each of those arrays have a key of 'runs when' and a value which is an English description of the hook.
However, the actual behavior is (Change is underlined)
Return value
- A nested array. The outermost key defines the module that the triggers are from. The menu system will use the key to look at the .info file of the module and make a local task (a tab) in the trigger UI.
- The next key is the module name again..
- Inside of that array are a list of arrays keyed by hook operation.
- Each of those arrays have a key of 'runs when' and a value which is an English description of the hook.
I have attached a patch that I believe rectifies this.
I should also mention that all the documentation I could find for this feature assumes that the first two keys do not have to be identical.
| Attachment | Size | Status | Test result | Operations |
|---|---|---|---|---|
| trigger.patch | 583 bytes | Idle | Failed: Failed to apply patch. | View details | Re-test |
Comments
#1
The last submitted patch failed testing.
#2
#3
The last submitted patch failed testing.
#4
#5
The last submitted patch failed testing.
#6
Spending more time convincing test bed it's validly formatted than I did fixing the bug.
#7
The last submitted patch failed testing.
#8
I think the manual node override is causing problems.
#9
Apparently, I forgot to attach.
#10
Since the original design may have been attempting to prevent namespace collisions. Here is a new patch that requires the "hook being described" to begin with the module name.
#11
The last submitted patch failed testing.
#12
re-rolling to account for #383066: hook_nodeapi_X => hook_node_X
#13
The last submitted patch failed testing.
#14
I think the auto tester had a bad day.
P.S. Is there anyway to get notification of testing failure?
#15
The last submitted patch failed testing.
#16
I think the auto tester had another bad day.
Apparently nobody wants this fixed?
#17
The last submitted patch failed testing.
#18
Re-rolling to account for #353069: Make drupal_get_form to return unrendered forms.
#19
The last submitted patch failed testing.
#20
Undoing namespace restriction from #10 as it appears to be crashing cron. Perhaps related to #246096: Cron triggers are not executed.
#21
The last submitted patch failed testing.
#22
I suppose I deserve that for trying to edit the patch directly.
#23
The last submitted patch failed testing.
#24
Missed a line in my namespace removal patch.
#25
The last submitted patch failed testing.
#26
It seemed like a good idea at the time to check that. Sigh.
#27
The last submitted patch failed testing.
#28
I believe that #324183: Better Access Control in Custom Triggers is the root cause of this problem.
#29
Since now #324183: Better Access Control in Custom Triggers is effectively a WONTFIX for 7.x and will only be dealt with in 8.x, should this issue be reopened?