-
Notifications
You must be signed in to change notification settings - Fork 63
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
Adding new blocks throws "There was a problem getting the previous element." Error #967
Comments
I updated to Neo version 4.2.21, still observing the error above. |
If possible, could you please send your composer.json/lock files and database backup to [email protected], along with information about an entry where this is happening, and we'll have a look. |
Thanks for sending that in. Unfortunately I couldn't reproduce it there, but I'm guessing this generally involves some mixup with what the previous block actually is, if more than one is being created at the same time. We shouldn't really be allowing multiple block creation operations at the same time anyway, because of the possibility of issues like this, so I've made changes in the 4.x branch so that the new block buttons will be disabled while a new block is being created. I'll update here when the next release is tagged. |
Thank you for your quick reply. For your information, if I create a block and wait until the block is there and then create the next one, the error occurs as well. Nevertheless, I would try the update. |
That sounds like the update won't help, then. Would it be possible for you to make a screen recording of the issue and send that in by email? I feel like there's something I'm missing that a screen recording could help me understand. |
I just sent you the screen recording. |
Bug Description
When an editor creates new blocks rapidly, the NEO plugin throws the following exception:
[web.ERROR] [yii\base\Exception] There was a problem getting the previous element. {"trace":["#0 /app/vendor/spicyweb/craft-neo/src/controllers/Input.php(136): craft\services\Structures->moveAfter()","#1 [internal function]: benf\neo\controllers\Input->actionRenderBlocks()","#2 /app/vendor/yiisoft/yii2/base/InlineAction.php(57): call_user_func_array()","#3 /app/vendor/yiisoft/yii2/base/Controller.php(178): yii\base\InlineAction->runWithParams()","#4 /app/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()","#5 /app/vendor/craftcms/cms/src/web/Application.php(340): yii\base\Module->runAction()","#6 /app/vendor/craftcms/cms/src/web/Application.php(639): craft\web\Application->runAction()","#7 /app/vendor/craftcms/cms/src/web/Application.php(302): craft\web\Application->_processActionRequest()","#8 /app/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()","#9 /app/web/index.php(16): yii\base\Application->run()","#10 {main}"],"memory":55790784,"exception":"[object] (yii\base\Exception(code: 0): There was a problem getting the previous element. at /app/vendor/craftcms/cms/src/services/Structures.php:410)"}
This occurs when the loading icon of the previous block is still visible and the editor has already created a new block.
Steps to reproduce
Expected behaviour
No response
Neo version
4.2.14
Craft CMS version
4.11.3
What is the affected Neo field's propagation method?
No response
Does this issue involve templating, and if so, is eager-loading used?
This is not a templating issue
The text was updated successfully, but these errors were encountered: