It should be indicated that $context is required to be set to an array in the documentation. (Or the code should be fixed to set it = array(). ) I tried using actions_do without $context set and the NULL value you that it defaulted to gave me an error message for line 123 of includes/actions.inc having a problem the first argument to array_merge.

Comments

jhodgdon’s picture

Title: Documentation problem with actions_do » actions_do(): $context arg should default to array() not NULL
Version: 6.x-dev » 7.x-dev
Component: documentation » base system

Yeah, that does look like a problem -- thanks for taking the time to report it!

The code is exactly the same in D7 and it should be fixed there first, then ported back to D6.

I'm going to suggest that it is a problem in the code rather than the documentation, and that the default value for $context in actions_do() should be set to array() so that array_merge($context, $something) will not crash.

I guess we don't have a component for actions, so I've set this to "base system".

darrellduane’s picture

Assigned: Unassigned » darrellduane

Ok, I'll work on it.

jordojuice’s picture

Version: 7.x-dev » 8.x-dev
Status: Active » Needs review
StatusFileSize
new814 bytes

This looks like a good issue for my first core patch... doesn't seem too complicated! :-)

Status: Needs review » Needs work

The last submitted patch, actions_do-context-default-992858-3.patch, failed testing.

jordojuice’s picture

Assigned: darrellduane » Unassigned
Status: Needs work » Needs review

Hmm... this doesn't seem to be an issue with the patch.

jordojuice’s picture

jordojuice’s picture

Ahh there we go :-)

Status: Needs review » Needs work

The last submitted patch, 3: actions_do-context-default-992858-3.patch, failed testing.

dawehner’s picture

Component: base system » action.module
Issue summary: View changes

.

Version: 8.0.x-dev » 8.1.x-dev

Drupal 8.0.6 was released on April 6 and is the final bugfix release for the Drupal 8.0.x series. Drupal 8.0.x will not receive any further development aside from security fixes. Drupal 8.1.0-rc1 is now available and sites should prepare to update to 8.1.0.

Bug reports should be targeted against the 8.1.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.2.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.1.x-dev » 8.2.x-dev

Drupal 8.1.9 was released on September 7 and is the final bugfix release for the Drupal 8.1.x series. Drupal 8.1.x will not receive any further development aside from security fixes. Drupal 8.2.0-rc1 is now available and sites should prepare to upgrade to 8.2.0.

Bug reports should be targeted against the 8.2.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.3.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.2.x-dev » 8.3.x-dev

Drupal 8.2.6 was released on February 1, 2017 and is the final full bugfix release for the Drupal 8.2.x series. Drupal 8.2.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.3.0 on April 5, 2017. (Drupal 8.3.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.3.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.4.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.3.x-dev » 8.4.x-dev

Drupal 8.3.6 was released on August 2, 2017 and is the final full bugfix release for the Drupal 8.3.x series. Drupal 8.3.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.4.0 on October 4, 2017. (Drupal 8.4.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.4.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.5.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.4.x-dev » 8.5.x-dev

Drupal 8.4.4 was released on January 3, 2018 and is the final full bugfix release for the Drupal 8.4.x series. Drupal 8.4.x will not receive any further development aside from critical and security fixes. Sites should prepare to update to 8.5.0 on March 7, 2018. (Drupal 8.5.0-alpha1 is available for testing.)

Bug reports should be targeted against the 8.5.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.6.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

Version: 8.5.x-dev » 8.6.x-dev

Drupal 8.5.6 was released on August 1, 2018 and is the final bugfix release for the Drupal 8.5.x series. Drupal 8.5.x will not receive any further development aside from security fixes. Sites should prepare to update to 8.6.0 on September 5, 2018. (Drupal 8.6.0-rc1 is available for testing.)

Bug reports should be targeted against the 8.6.x-dev branch from now on, and new development or disruptive changes should be targeted against the 8.7.x-dev branch. For more information see the Drupal 8 minor version schedule and the Allowed changes during the Drupal 8 release cycle.

andypost’s picture

Status: Needs work » Closed (duplicate)
Related issues: +#2359559: Solve executeMultiple() for action plugins