verbb / smith

A Craft CMS plugin to add copy, paste and clone functionality to Matrix blocks.
MIT License
25 stars 9 forks source link

Unable to clone blocks containing Super Table fields #6

Closed jwb009 closed 4 years ago

jwb009 commented 4 years ago

Description

I'm unable to clone or copy/paste any matrix blocks that contain a Super Table field. I get a Server Error Occurred message. The console error: POST http://ks3.test/index.php/cms/actions/smith/field/render-matrix-blocks 500 (Internal Server Error) jquery.js:10099

Stack Trace:

 yii\web\BadRequestHttpException: Request must accept JSON in response in /Users/4319jb/sites/ks3/vendor/craftcms/cms/src/web/Controller.php:352
Stack trace:
#0 /Users/4319jb/sites/ks3/vendor/verbb/smith/src/controllers/FieldController.php(20): craft\web\Controller->requireAcceptsJson()
#1 [internal function]: verbb\smith\controllers\FieldController->actionRenderMatrixBlocks()
#2 /Users/4319jb/sites/ks3/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array(Array, Array)
#3 /Users/4319jb/sites/ks3/vendor/yiisoft/yii2/base/Controller.php(157): yii\base\InlineAction->runWithParams(Array)
#4 /Users/4319jb/sites/ks3/vendor/craftcms/cms/src/web/Controller.php(178): yii\base\Controller->runAction('render-matrix-b...', Array)
#5 /Users/4319jb/sites/ks3/vendor/yiisoft/yii2/base/Module.php(528): craft\web\Controller->runAction('render-matrix-b...', Array)
#6 /Users/4319jb/sites/ks3/vendor/craftcms/cms/src/web/Application.php(291): yii\base\Module->runAction('smith/field/ren...', Array)
#7 /Users/4319jb/sites/ks3/vendor/craftcms/cms/src/web/Application.php(559): craft\web\Application->runAction('smith/field/ren...', Array)
#8 /Users/4319jb/sites/ks3/vendor/craftcms/cms/src/web/Application.php(270): craft\web\Application->_processActionRequest(Object(craft\web\Request))
#9 /Users/4319jb/sites/ks3/vendor/yiisoft/yii2/base/Application.php(386): craft\web\Application->handleRequest(Object(craft\web\Request))
#10 /Users/4319jb/sites/ks3/web/index.php(17): yii\base\Application->run()
#11 {main}

Steps to reproduce

  1. Add a block which contains a Super Table field
  2. Try to copy/paste or duplicate it

Additional info

engram-design commented 4 years ago

Fixed in 1.1.4