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

Calling unknown method: yii\console\Response::setStatusCode() #943

Closed
jerome2710 opened this issue Aug 11, 2021 · 3 comments
Closed

Calling unknown method: yii\console\Response::setStatusCode() #943

jerome2710 opened this issue Aug 11, 2021 · 3 comments
Labels

Comments

@jerome2710
Copy link

Describe the bug

When generating the sitemaps through console commands, the response is an instance of yii\console\Response, which does not have status codes. The sitemap generation can therefore not set status-codes in the response.

./craft seomatic/sitemap/generate
yii\base\UnknownMethodException: Calling unknown method: yii\console\Response::setStatusCode()
#13 /{redacted}/vendor/yiisoft/yii2/base/Component.php(301): yii\base\Component::__call
#12 /{redacted}/vendor/nystudio107/craft-seomatic/src/models/SitemapTemplate.php(191): nystudio107\seomatic\models\SitemapTemplate::render
#11 /{redacted}/vendor/nystudio107/craft-seomatic/src/services/Sitemaps.php(538): nystudio107\seomatic\services\Sitemaps::invalidateSitemapCache
#10 /{redacted}/vendor/nystudio107/craft-seomatic/src/console/controllers/SitemapController.php(110): nystudio107\seomatic\console\controllers\SitemapController::actionGenerate
#9 [internal](0): call_user_func_array
#8 /{redacted}/vendor/yiisoft/yii2/base/InlineAction.php(57): yii\base\InlineAction::runWithParams
#7 /{redacted}/vendor/yiisoft/yii2/base/Controller.php(181): yii\base\Controller::runAction
#6 /{redacted}/vendor/yiisoft/yii2/console/Controller.php(184): yii\console\Controller::runAction
#5 /{redacted}/vendor/yiisoft/yii2/base/Module.php(534): yii\base\Module::runAction
#4 /{redacted}/vendor/yiisoft/yii2/console/Application.php(181): yii\console\Application::runAction
#3 /{redacted}/vendor/craftcms/cms/src/console/Application.php(89): craft\console\Application::runAction
#2 /{redacted}/vendor/yiisoft/yii2/console/Application.php(148): yii\console\Application::handleRequest
#1 /{redacted}/vendor/yiisoft/yii2/base/Application.php(392): yii\base\Application::run
#0 /{redacted}/craft(26): null

Versions

  • Plugin version: 3.3.47
  • Craft version: 3.7.8
@jerome2710 jerome2710 added the bug label Aug 11, 2021
@khalwat
Copy link
Collaborator

khalwat commented Aug 11, 2021

Can you give me the entire stack trace? It looks like it might be cut off at #13? @jerome2710

khalwat added a commit that referenced this issue Aug 11, 2021
… to fail ([#943](#943))

Signed-off-by: Andrew Welch <andrew@nystudio107.com>
@khalwat
Copy link
Collaborator

khalwat commented Aug 11, 2021

Fixed in: d528a99

@khalwat khalwat closed this as completed Aug 11, 2021
@khalwat
Copy link
Collaborator

khalwat commented Aug 11, 2021

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

No branches or pull requests

2 participants