Skip to content

Fix GenerateReportCommand not found when generating reports#557

Merged
duncanmcclean merged 2 commits into7.xfrom
fix/register-generate-report-command
May 5, 2026
Merged

Fix GenerateReportCommand not found when generating reports#557
duncanmcclean merged 2 commits into7.xfrom
fix/register-generate-report-command

Conversation

@duncanmcclean
Copy link
Copy Markdown
Member

This pull request fixes an issue where clicking "Generate Report" in the Control Panel throws a CommandNotFoundException for statamic:seo-pro:generate-report.

This was happening because Statamic's AddonServiceProvider only auto-discovers commands when runningInConsole() is true. When the report is generated via a web request (using Artisan::queue with the sync queue driver), the command was never registered.

This PR fixes it by explicitly registering GenerateReportCommand in the service provider's register() method, which runs regardless of context.

Fixes #556

duncanmcclean and others added 2 commits May 5, 2026 18:03
Statamic's AddonServiceProvider only auto-discovers commands when
running in the console. When the report is generated via the CP
(using Artisan::queue with the sync driver), the command isn't
registered, causing a CommandNotFoundException.

Fixes #556

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@duncanmcclean duncanmcclean merged commit 1b8edcb into 7.x May 5, 2026
14 checks passed
@duncanmcclean duncanmcclean deleted the fix/register-generate-report-command branch May 5, 2026 17:10
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

Successfully merging this pull request may close these issues.

statamic:seo-pro:generate-report not found when generating report

1 participant