Problem/Motivation

5.1.8 release throws the following error if Charts API Example sub-module is enabled:
ArgumentCountError: Too few arguments to function Drupal\charts_api_example\Hook\ChartsApiExampleHooks::help(), 0 passed in .../modules/contrib/charts/modules/charts_api_example/charts_api_example.module on line 18 and exactly 2 expected in Drupal\charts_api_example\Hook\ChartsApiExampleHooks->help() (line 32 of .../modules/contrib/charts/modules/charts_api_example/src/Hook/ChartsApiExampleHooks.php).

Steps to reproduce

Enable Charts API Example submodule in 5.1.8 release

Proposed resolution

Add parameters in calling code.

Remaining tasks

Once I submit merge request, theoretically none

Issue fork charts-3562773

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

sean_fremouw created an issue. See original summary.

sean_fremouw’s picture

Issue summary: View changes
andileco’s picture

Thanks for this! Don't know why I didn't experience it. What version of core are you on?

sean_fremouw’s picture

@andileco 10.5.8

andileco’s picture

Status: Active » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

emerham’s picture

This affects any hook_help in the code
modules/charts_api_example/src/Hook/ChartsApiExampleHooks.php: * Implements hook_help().
modules/charts_api_example/charts_api_example.module: * Implements hook_help().
modules/charts_blocks/charts_blocks.module: * Implements hook_help().
modules/charts_blocks/src/Hook/ChartsBlocksHooks.php: * Implements hook_help().
After applying the patch:

ArgumentCountError: Too few arguments to function Drupal\charts_blocks\Hook\ChartsBlocksHooks::help(), 0 passed in /var/www/html/docroot/modules/contrib/charts/modules/charts_blocks/charts_blocks.module on line 18 and exactly 2 expected in Drupal\charts_blocks\Hook\ChartsBlocksHooks->help() (line 32 of modules/contrib/charts/modules/charts_blocks/src/Hook/ChartsBlocksHooks.php).

I am also on Core version 10.5.8

andileco’s picture

Status: Fixed » Needs work

Oof, I wish these things would actually error for me or in Drupal CI. I'll fix these.

andileco’s picture

Status: Needs work » Fixed

Now that this issue is closed, review the contribution record.

As a contributor, attribute any organization that helped you, or if you volunteered your own time.

Maintainers, credit people who helped resolve this issue.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.