{"record":{"id":"92ac7ee88b9b765f","repo":"octobercms/october","slug":"mass-assignment-failed-for-model-attribute-attri","errorCode":null,"errorMessage":"Mass assignment failed for Model attribute ':attribute'.","messagePattern":"Mass assignment failed for Model attribute ':attribute'\\.","errorType":"exception","errorClass":"SystemException","httpStatus":null,"severity":"error","filePath":"modules/backend/classes/Controller.php","lineNumber":549,"sourceCode":"                 *             if ($componentAlias === $this->getBackendWidgetAlias()) {\n                 *                 return $this->backendControllerProxy->runAjaxHandler($handler);\n                 *             }\n                 *         }\n                 *     });\n                 *\n                 */\n                if ($event = $this->fireSystemEvent('backend.ajax.beforeRunHandler', [$handler])) {\n                    $response = ajax()::wrap($event);\n                }\n                else {\n                    $response = $this->callAjaxAction($this->action, $this->params);\n                }\n            }\n            catch (ComponentNotFound $ex) {\n                throw new SystemException(Lang::get('backend::lang.widget.not_bound', ['name'=>$this->getAjaxRequest()->component]));\n            }\n            catch (MassAssignmentException $ex) {\n                throw new SystemException(Lang::get('backend::lang.model.mass_assignment_failed', ['attribute' => $ex->getMessage()]));\n            }\n            catch (HandlerNameInvalid $ex) {\n                throw new ApplicationException(Lang::get('backend::lang.ajax_handler.invalid_name', ['name'=>$handler]));\n            }\n            catch (HandlerNotFound $ex) {\n                throw new ApplicationException(Lang::get('backend::lang.ajax_handler.not_found', ['name'=>e($handler)]));\n            }\n        }\n        catch (ValidationException $ex) {\n            Flash::error($ex->getMessage());\n            $response = ajax()->invalidFields($ex->errors());\n        }\n        catch (Throwable $ex) {\n            report($ex);\n            $response = ajax()->exception($ex);\n        }\n\n        if ($this->hasAssetsDefined()) {","sourceCodeStart":531,"sourceCodeEnd":567,"githubUrl":"https://github.com/octobercms/october/blob/b608633a7e8922487d91a8161499020121c3b3bf/modules/backend/classes/Controller.php#L531-L567","documentation":"Thrown in execAjaxHandlers when the underlying AJAX action fails with a Laravel MassAssignmentException — i.e. an attempt to fill a model attribute that is not mass-assignable (not in the model's $fillable rules). The generic message wraps the original exception; the attribute name is given in the error placeholders. It indicates unsafe attribute injection during an AJAX handler call.","triggerScenarios":"Thrown at modules/backend/classes/Controller.php:549 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Add the attribute to the model's $fillable array (or remove it from $guarded)","Explicitly pass only expected keys to the model's fill()/create() call instead of raw post() data","If the attribute should never be settable, reject or ignore it in the request data before filling"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"b608633a7e8922487d91a8161499020121c3b3bf","analyzedAt":"2026-08-21T04:24:57.515Z","contentChangedAt":"2026-08-21T04:24:57.515Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}