Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I've noticed this before and just ran across it again. I'd like to get this behavior confirmed: when you add an action to a predicate and then go trigger that predicate, the action doesn't seem to get performed unless you first clicked the "Save changes" button on the attributes form. This shouldn't be necessary given the way the form is supposed to work. This may also in fact be true for conditions.
Comments
Comment #1
Island Usurper CreditAttribution: Island Usurper commentedThat'd be a "confirmed", there, bud. The "Remove Action" button works without clicking "Save changes", though.
I think I found why. The action is present in the database row for the predicate, but it doesn't look like it's in the right format. There is an #arguments key, where there should be an #argument_map. There is also not a #settings key until "Save changes" is clicked. This sounds to me like there's a bug in the submit handler for "Add action".
Comment #2
nymo CreditAttribution: nymo commentedJust ran into that bug...is there a proposed solution for this?
As Island Usurper noticed, the #argument_map is not inserted into the serialized actions. The problem is that, during add action form submission,
ca_actions_form_update_actions()
is called, which i think sets the predicate's actions properly, but thenca_add_action()
is called right after.Since they both call
ca_save_predicate()
, the latter overwrites the former, and doesn't include the argument_map nor settings variables.A quick fix would be to remove the call to
ca_add_action()
, but i think fixing how an action is saved in the database is a better solution.Comment #3
torgosPizzaCan you submit a patch? I'd be able to test it.
Comment #4
TR CreditAttribution: TR commentedI have yet to confirm that this is still a bug. Just moving the issue to -dev.
Comment #5
TR CreditAttribution: TR commentedIf someone is willing to work on this, please submit a patch. CA has been deprecated in favor of Rules, so there's not much point in putting a lot of effort into usability issues this late in the game.
Comment #6
longwaveNot convinced this is actually a problem, and either way it's not really worth fixing in 6.x now.