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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.02 KB

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.07 KB

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.04 KB

Spending more time convincing test bed it's validly formatted than I did fixing the bug.

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

I think the manual node override is causing problems.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.19 KB

Apparently, I forgot to attach.

antgiant’s picture

FileSize
1.36 KB

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.

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.23 KB

re-rolling to account for #383066: hook_nodeapi_X => hook_node_X

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review

I think the auto tester had a bad day.

P.S. Is there anyway to get notification of testing failure?

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review

I think the auto tester had another bad day.

Apparently nobody wants this fixed?

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Title: Trigger module behavior does not conform to documentation » Bug in trigger module behavior
Status: Needs work » Needs review
Issue tags: +trigger
FileSize
1.25 KB

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.08 KB

Undoing namespace restriction from #10 as it appears to be crashing cron. Perhaps related to #246096: Cron triggers are not executed.

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.08 KB

I suppose I deserve that for trying to edit the patch directly.

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.1 KB

Missed a line in my namespace removal patch.

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Needs review
FileSize
1.04 KB

It seemed like a good idea at the time to check that. Sigh.

Status: Needs review » Needs work

The last submitted patch failed testing.

antgiant’s picture

Status: Needs work » Closed (duplicate)

I believe that #324183: Better Access Control in Custom Triggers is the root cause of this problem.

gnassar’s picture

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?