Closed mersy closed 2 years ago
In entry index page , I can duplicate draft. After that error occurred when open duplicated draft.
I don't need to duplicate it, but I happened to find it when I duplicated other entries.
3 . Error occurred
TypeError: Cannot assign bool to property craft\base\Element::$_canonicalAnySite of type ?craft\base\ElementInterface in /home/XXXXXXXXXX/craft4-test/vendor/craftcms/cms/src/base/Element.php:2482 Stack trace: #0 /home/XXXXXXXXXX/craft4-test/vendor/craftcms/cms/src/controllers/ElementsController.php(277): craft\base\Element->getCanonical(true) #1 [internal function]: craft\controllers\ElementsController->actionEdit(Object(craft\elements\Entry), 446) #2 /home/XXXXXXXXXX/craft4-test/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array) #3 /home/XXXXXXXXXX/craft4-test/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array) #4 /home/XXXXXXXXXX/craft4-test/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction('edit', Array) #5 /home/XXXXXXXXXX/craft4-test/vendor/craftcms/cms/src/web/Application.php(301): yii\base\Module->runAction('elements/edit', Array) #6 /home/XXXXXXXXXX/craft4-test/vendor/yiisoft/yii2/web/Application.php(103): craft\web\Application->runAction('elements/edit', Array) #7 /home/XXXXXXXXXX/craft4-test/vendor/craftcms/cms/src/web/Application.php(286): yii\web\Application->handleRequest(Object(craft\web\Request)) #8 /home/XXXXXXXXXX/craft4-test/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest(Object(craft\web\Request)) #9 /home/XXXXXXXXXX/public_html/craft4-test/index.php(13): yii\base\Application->run() #10 {main}
Maybe open draft edit page or Draft can't duplicate
Error occurred
4.2.5
8.0.22
Linux 3.10.0-962.3.2.lve1.5.39.el7.x86_64
MySQL 10.3.36
GD 8.0.23
Thanks for reporting that! Craft 4.2.5.1 is out with a fix.
What happened?
Description
In entry index page , I can duplicate draft. After that error occurred when open duplicated draft.
I don't need to duplicate it, but I happened to find it when I duplicated other entries.
Steps to reproduce
3 . Error occurred
Expected behavior
Maybe open draft edit page or Draft can't duplicate
Actual behavior
Error occurred
Craft CMS version
4.2.5
PHP version
8.0.22
Operating system and version
Linux 3.10.0-962.3.2.lve1.5.39.el7.x86_64
Database type and version
MySQL 10.3.36
Image driver and version
GD 8.0.23
Installed plugins and versions