Closed hatyi closed 1 month ago
I saw that even though I have started the development of this project only a few months ago I'm already way behind the current stable version.. So I'll try to update everything in the upcoming days and close / follow-up on the issue if it disappears.
Hi, I believe this was fixed in version 5.1.9
(via #15134).
I’ll close this now, but feel free to reach out again if the issue persists after the update.
What happened?
Description
I'm trying to save a variant in Craft and sometimes I'm facing this error, it shows up as a flash message in the bottom left corner and it prevents the variant from being saved. If the error happens I can't discard the unsaved changes either.
Steps to reproduce
Expected behavior
Variant is updated or the changes are discarded.
Actual behavior
Stack trace
2024-09-12 10:41:26 [web.ERROR] [yii\base\UnknownMethodException] yii\base\UnknownMethodException: Calling unknown method: craft\web\Response::getIsDraft() in /var/www/html/vendor/yiisoft/yii2/base/Component.php:300 Stack trace:
0 /var/www/html/vendor/craftcms/cms/src/controllers/ElementsController.php(1637): yii\base\Component->__call('getIsDraft', Array)
1 [internal function]: craft\controllers\ElementsController->actionApplyDraft()
2 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
3 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
4 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('apply-draft', Array)
5 /var/www/html/vendor/craftcms/cms/src/web/Application.php(349): yii\base\Module->runAction('elements/apply-...', Array)
6 /var/www/html/vendor/craftcms/cms/src/web/Application.php(650): craft\web\Application->runAction('elements/apply-...', Array)
7 /var/www/html/vendor/craftcms/cms/src/web/Application.php(311): craft\web\Application->_processActionRequest(Object(craft\web\Request))
8 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request))
9 /var/www/html/web/index.php(12): yii\base\Application->run()
10 {main} {"memory":4796984,"exception":"[object] (yii\base\UnknownMethodException(code: 0): Calling unknown method: craft\web\Response::getIsDraft() at /var/www/html/vendor/yiisoft/yii2/base/Component.php:300)"}
Craft CMS version
5.1.1
PHP version
PHP 8.2.22 (cli)
Operating system and version
Ubuntu 22.04 (running PHP FPM, Nginx, MySQL in Docker)
Database type and version
mysql:8.0.36
Image driver and version
No response
Installed plugins and versions