{"record":{"id":"fe6d18e6d072512c","repo":"yiisoft/yii2","slug":"unknown-attribute-attribute","errorCode":null,"errorMessage":"Unknown attribute: $attribute","messagePattern":"Unknown attribute: \\$attribute","errorType":"exception","errorClass":"InvalidConfigException","httpStatus":null,"severity":"error","filePath":"framework/data/Sort.php","lineNumber":452,"sourceCode":"        if ($absolute) {\n            return $urlManager->createAbsoluteUrl($params);\n        }\n\n        return $urlManager->createUrl($params);\n    }\n\n    /**\n     * Creates the sort variable for the specified attribute.\n     * The newly created sort variable can be used to create a URL that will lead to\n     * sorting by the specified attribute.\n     * @param string $attribute the attribute name\n     * @return string the value of the sort variable\n     * @throws InvalidConfigException if the specified attribute is not defined in [[attributes]]\n     */\n    public function createSortParam($attribute)\n    {\n        if (!isset($this->attributes[$attribute])) {\n            throw new InvalidConfigException(\"Unknown attribute: $attribute\");\n        }\n        $definition = $this->attributes[$attribute];\n        $directions = $this->getAttributeOrders();\n        if (isset($directions[$attribute])) {\n            if ($this->enableMultiSort) {\n                if ($directions[$attribute] === SORT_ASC) {\n                    $direction = SORT_DESC;\n                } else {\n                    $direction = null;\n                }\n            } else {\n                $direction = $directions[$attribute] === SORT_DESC ? SORT_ASC : SORT_DESC;\n            }\n\n            unset($directions[$attribute]);\n        } else {\n            $direction = isset($definition['default']) ? $definition['default'] : SORT_ASC;\n        }","sourceCodeStart":434,"sourceCodeEnd":470,"githubUrl":"https://github.com/yiisoft/yii2/blob/66f00d18a29b520f85e8e8f1e32d1e7e7b556cac/framework/data/Sort.php#L434-L470","documentation":"Error \"Unknown attribute: $attribute\" thrown in yiisoft/yii2.","triggerScenarios":"Thrown at framework/data/Sort.php:452 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":"66f00d18a29b520f85e8e8f1e32d1e7e7b556cac","analyzedAt":"2026-08-17T05:17:23.470Z","schemaVersion":2},"datasetVersion":"2026-08-17T09:17:11.063Z"}