{"record":{"id":"47ad3953e740105c","repo":"getgrav/grav","slug":"flexform-bad-http-method-s","errorCode":null,"errorMessage":"FlexForm: Bad HTTP method %s","messagePattern":"FlexForm: Bad HTTP method (.+?)","errorType":"exception","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"system/src/Grav/Framework/Form/Traits/FormTrait.php","lineNumber":716,"sourceCode":"        return $twig->twig()->resolveTemplate(\n            [\n                \"forms/{$layout}/form.html.twig\",\n                'forms/default/form.html.twig'\n            ]\n        );\n    }\n\n    /**\n     * Parse PSR-7 ServerRequest into data and files.\n     *\n     * @param ServerRequestInterface $request\n     * @return array\n     */\n    protected function parseRequest(ServerRequestInterface $request): array\n    {\n        $method = $request->getMethod();\n        if (!in_array($method, ['PUT', 'POST', 'PATCH'])) {\n            throw new RuntimeException(sprintf('FlexForm: Bad HTTP method %s', $method));\n        }\n\n        $body = (array)$request->getParsedBody();\n        $data = isset($body['data']) ? $this->decodeData($body['data']) : null;\n\n        $flash = $this->getFlash();\n        /*\n        if (null !== $data) {\n            $flash->setData($data);\n            $flash->save();\n        }\n        */\n\n        $blueprint = $this->getBlueprint();\n        $includeOriginal = (bool)($blueprint->form()['images']['original'] ?? null);\n        $files = $flash->getFilesByFields($includeOriginal);\n\n        $data = $blueprint->processForm($data ?? [], $body['toggleable_data'] ?? []);","sourceCodeStart":698,"sourceCodeEnd":734,"githubUrl":"https://github.com/getgrav/grav/blob/6040efed04efa69b8209448ed81308e7c24147c2/system/src/Grav/Framework/Form/Traits/FormTrait.php#L698-L734","documentation":"Error \"FlexForm: Bad HTTP method %s\" thrown in getgrav/grav.","triggerScenarios":"Thrown at system/src/Grav/Framework/Form/Traits/FormTrait.php:716 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":[],"exampleFix":null,"handlingStrategy":null,"validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"6040efed04efa69b8209448ed81308e7c24147c2","analyzedAt":"2026-08-17T05:07:31.593Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}