Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[4.x]: Error when calling the help command for any resave action defined via the event #11423

Closed
rynpsc opened this issue Jun 9, 2022 · 3 comments

Comments

@rynpsc
Copy link
Contributor

rynpsc commented Jun 9, 2022

What happened?

Description

When calling help against a commerce resave sub-command an exception is thrown. This happens for all elements, the error is not present for Craft core element resave commands.

php craft help resave/carts
php craft help resave/orders
php craft help resave/products
Exception 'TypeError' with message 'craft\console\Controller::getActionMethodReflection(): Return value must be of type ReflectionMethod, ReflectionFunction returned'

in /var/www/html/vendor/craftcms/cms/src/console/Controller.php:330

Steps to reproduce

  1. From the command line run the help command with any of the commerce sub-commands .e.g. php craft help resave/orders

Expected behavior

Help is displayed.

Actual behavior

An exception is thrown.

Craft CMS version

4.0.4

Craft Commerce version

4.0.3

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

@nfourtythree
Copy link
Contributor

Hi @rynpsc

Thank you for bringing this to our attention. It looks like it is an issue with Craft itself and the way plugins define elements that can be resaved using the resave action.

I have verified that Commerce's console classes/actions display the help information as expected and it is just that these are defined via an event.

Will move this issue over to the cms repository.

Thanks!

@nfourtythree nfourtythree changed the title [4.x]: Error when calling help command for resave [4.x]: Error when calling the help command for any resave action defined via the event Jun 10, 2022
@nfourtythree nfourtythree transferred this issue from craftcms/commerce Jun 10, 2022
@brandonkelly
Copy link
Member

Fixed for the next Craft release!

@brandonkelly
Copy link
Member

Craft 4.0.5 is out now with that fix.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants