verbb / navigation

A Craft CMS plugin to create navigation menus for your site.
Other
90 stars 23 forks source link

Can't reorder items: A server error occured #356

Closed maxpdesign closed 1 year ago

maxpdesign commented 1 year ago

Describe the bug

A client website is currently running this plugin on version 1.4.32 and we are unable to reorder items. We get the message "A server error occurred". When I check the logs I see it is trying to get the required body param elementId but only the structureId is being sent in $_POST.

When I downgrade the plugin to 1.4.31 we are not getting the issue.

Steps to reproduce

  1. Install Navigation version 1.4.32
  2. Create a navigation
  3. Add items
  4. Try to reorder the items

Craft CMS version

3.8.13

Plugin version

1.4.32

Multi-site?

Yes

Additional context

No response

espensgr commented 1 year ago

We are getting the same error, this is on all our sites after update. Adding the entire response:


{
    "name": "Bad Request",
    "message": "Request missing required body param",
    "code": 0,
    "error": "Request missing required body param",
    "status": 400,
    "exception": "yii\\web\\BadRequestHttpException",
    "file": "/var/www/html/vendor/craftcms/cms/src/web/Request.php",
    "line": 916,
    "trace": [
        {
            "file": "/var/www/html/vendor/craftcms/cms/src/controllers/StructuresController.php",
            "line": 53,
            "function": "getRequiredBodyParam",
            "class": "craft\\web\\Request",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/yiisoft/yii2/base/Controller.php",
            "line": 176,
            "function": "beforeAction",
            "class": "craft\\controllers\\StructuresController",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/yiisoft/yii2/base/Module.php",
            "line": 552,
            "function": "runAction",
            "class": "yii\\base\\Controller",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/craftcms/cms/src/web/Application.php",
            "line": 295,
            "function": "runAction",
            "class": "yii\\base\\Module",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/craftcms/cms/src/web/Application.php",
            "line": 608,
            "function": "runAction",
            "class": "craft\\web\\Application",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/craftcms/cms/src/web/Application.php",
            "line": 274,
            "function": "_processActionRequest",
            "class": "craft\\web\\Application",
            "type": "->"
        },
        {
            "file": "/var/www/html/vendor/yiisoft/yii2/base/Application.php",
            "line": 384,
            "function": "handleRequest",
            "class": "craft\\web\\Application",
            "type": "->"
        },
        {
            "file": "/var/www/html/web/index.php",
            "line": 12,
            "function": "run",
            "class": "yii\\base\\Application",
            "type": "->"
        }
    ]
}
joelstrom commented 1 year ago

We also stumbled on this same issue recently, actually sent in a separate support ticket regarding it also.

Noticed that downgrading to the previous version (1.4.32) removes the issue.

MattWilcox commented 1 year ago

Yep, just experienced the same problem.

The client was trying to drag and drop a newly created node into the right place and ...

2023-06-12 16:37:01 [-][9833][3375kfhgsk26rmsmd5kmc4rqln][error][yii\web\HttpException:400] yii\web\BadRequestHttpException: Request missing required body param in /home/REDACTED/craft/vendor/craftcms/cms/src/web/Request.php:916
Stack trace:
#0 /home/REDACTED/craft/vendor/craftcms/cms/src/controllers/StructuresController.php(53): craft\web\Request->getRequiredBodyParam()
#1 /home/REDACTED/craft/vendor/yiisoft/yii2/base/Controller.php(176): craft\controllers\StructuresController->beforeAction()
#2 /home/REDACTED/craft/vendor/yiisoft/yii2/base/Module.php(552): yii\base\Controller->runAction()
#3 /home/REDACTED/craft/vendor/craftcms/cms/src/web/Application.php(295): yii\base\Module->runAction()
#4 /home/REDACTED/craft/vendor/craftcms/cms/src/web/Application.php(608): craft\web\Application->runAction()
#5 /home/REDACTED/craft/vendor/craftcms/cms/src/web/Application.php(274): craft\web\Application->_processActionRequest()
#6 /home/REDACTED/craft/vendor/yiisoft/yii2/base/Application.php(384): craft\web\Application->handleRequest()
#7 /home/REDACTED/public_html/index.php(22): yii\base\Application->run()
#8 {main}

However, if they add the new node by using the "Parent" so it goes to the correct place on creation - that works.

howells commented 1 year ago

Noticed that downgrading to the previous version (1.4.32) removes the issue.

Downgrading to 1.4.31, right? I had to do that to get it to work.

joelstrom commented 1 year ago

Noticed that downgrading to the previous version (1.4.32) removes the issue.

Downgrading to 1.4.31, right? I had to do that to get it to work.

Yes!

terryupton commented 1 year ago

Yes. Just experienced this too.

Screenshot 2023-06-14 at 10 44 15
engram-design commented 1 year ago

Fixed in 1.4.33