when a trigger is assigned to a node creation (a mail and a redirect in my case) the node is inserted in the node table, but not in the event table.

To reproduce just create a "redirect" trigger when a user submit a new node to a "thank you" page and submit an event.

I suppose trigger is send before making the "insert into event_table".

Comments

killes@www.drop.org’s picture

which module does provide this trigger? It seems to me that this report should eb moved to that module's queue.

killes@www.drop.org’s picture

Priority: Critical » Normal
Status: Active » Postponed (maintainer needs more info)
enboig’s picture

The trigger modules is supplied by Drupal6 itself.

enboig’s picture

If the bug report must be moved to another module, you do it or should I open a new one?

killes@www.drop.org’s picture

Project: Event » Drupal core
Version: 6.x-2.x-dev » 7.x-dev
Component: Code » trigger.module
Status: Postponed (maintainer needs more info) » Active

I can confirm that this bug exists.

The problem seems to be that triger_nodeapi is run before event_nodeapi even though the letter t is after e and both have the same weight (0) . If I increase trigger's weight, then it works.

Moving to trigger.module.

Maybe trigger should come with a default weight.

killes@www.drop.org’s picture

15:01 < jmorahan> killes: it's based on the filepath not the filename
15:01 < jmorahan> killes: and modules/trigger is before sites/*/event

That's a classical d'oh.

So the resulution must be to add an extra weight to trigger.

enboig’s picture

The fact that trigger should work ok with event module but shouldn't if the modules was called xevent don't seem good to me. Shouldn't the trigger module be the last called module? or at least after any "insert/update/delete" action?

Otherwise, how can this weight be modified? modifying the code? or using a UI?

killes@www.drop.org’s picture

There's no Drupal UI, but you can use phpmyadmin to alter the weight column of the system table for the trigger module.

andypost’s picture

Status: Active » Closed (duplicate)