super-table icon indicating copy to clipboard operation
super-table copied to clipboard

Changing propagation method fails because of SuperTable query error

Open Numkil opened this issue 1 year ago • 0 comments

Describe the bug

I have a section with a Hero field built with Super Table. When trying to change the propagation method of this section Craft queues a job to apply the new propagation method to all pages.

This fails with the following error.

> yii\base\InvalidArgumentException: The source element must be canonical.
Stack trace:
#0 /var/www/html/vendor/verbb/super-table/src/fields/SuperTableField.php(1113): verbb\supertable\services\Service->duplicateOwnership(Object(verbb\supertable\fields\SuperTableField), Object(craft\elements\Entry), Object(craft\elements\Entry))
#1 /var/www/html/vendor/craftcms/cms/src/base/Element.php(5163): verbb\supertable\fields\SuperTableField->afterElementPropagate(Object(craft\elements\Entry), true)
#2 /var/www/html/vendor/craftcms/cms/src/elements/Entry.php(2065): craft\base\Element->afterPropagate(true)
#3 /var/www/html/vendor/craftcms/cms/src/services/Elements.php(1701): craft\elements\Entry->afterPropagate(true)
#4 /var/www/html/vendor/craftcms/cms/src/queue/jobs/ApplyNewPropagationMethod.php(131): craft\services\Elements->duplicateElement(Object(craft\elements\Entry), Array, false)
#5 /var/www/html/vendor/craftcms/cms/src/queue/BaseBatchedJob.php(130): craft\queue\jobs\ApplyNewPropagationMethod->processItem(Object(craft\elements\Entry))
#6 /var/www/html/vendor/yiisoft/yii2-queue/src/Queue.php(246): craft\queue\BaseBatchedJob->execute(Object(craft\queue\Queue))
#7 /var/www/html/vendor/yiisoft/yii2-queue/src/cli/Queue.php(162): yii\queue\Queue->handleMessage('139107', 'O:42:"craft\\que...', '300', '1')
#8 /var/www/html/vendor/yiisoft/yii2-queue/src/cli/Command.php(146): yii\queue\cli\Queue->execute('139107', 'O:42:"craft\\que...', '300', '1', '2928')
#9 [internal function]: yii\queue\cli\Command->actionExec('139107', '300', '1', '2928')
#10 /var/www/html/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#11 /var/www/html/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams(Array)
#12 /var/www/html/vendor/yiisoft/yii2/console/Controller.php(180): yii\base\Controller->runAction('exec', Array)
#13 /var/www/html/vendor/craftcms/cms/src/console/ControllerTrait.php(90): yii\console\Controller->runAction('exec', Array)
#14 /var/www/html/vendor/yiisoft/yii2/base/Module.php(552): craft\queue\Command->runAction('exec', Array)
#15 /var/www/html/vendor/yiisoft/yii2/console/Application.php(180): yii\base\Module->runAction('queue/exec', Array)
#16 /var/www/html/vendor/craftcms/cms/src/console/Application.php(90): yii\console\Application->runAction('queue/exec', Array)
#17 /var/www/html/vendor/yiisoft/yii2/console/Application.php(147): craft\console\Application->runAction('queue/exec', Array)
#18 /var/www/html/vendor/craftcms/cms/src/console/Application.php(121): yii\console\Application->handleRequest(Object(craft\console\Request))
#19 /var/www/html/vendor/yiisoft/yii2/base/Application.php(384): craft\console\Application->handleRequest(Object(craft\console\Request))
#20 /var/www/html/craft(13): yii\base\Application->run()
#21 {main}

Steps to reproduce

  1. Create section with a Super table field and set a propagation method between multiple sites.
  2. Save a few pages.
  3. edit the section and change the propagation method.
  4. check the queue job created by craft that fails

Craft CMS version

4.5.2

Plugin version

3.0.9

Multi-site?

"Yes"

Additional context

No response

Numkil avatar Sep 22 '23 11:09 Numkil