phalcon/cphalcon · error · Phalcon\Mvc\Model\Exceptions\SnapshotsDisabled

The 'keepSnapshots' option must be enabled to track changes

Error message

The 'keepSnapshots' option must be enabled to track changes in '{className}'

What it means

Error "The 'keepSnapshots' option must be enabled to track changes in '{className}'" thrown in phalcon/cphalcon.

Source

Thrown at phalcon/Mvc/Model.zep:2081

     * ```php
     * $invoices = Invoices::findFirst();
     * print_r($invoices->getChangedFields()); // []
     *
     * $invoices->deleted = 'Y';
     *
     * $invoices->getChangedFields();
     * print_r($invoices->getChangedFields()); // ["deleted"]
     * ```
     */
    public function getChangedFields() -> array
    {
        var metaData, name, snapshot, columnMap, allAttributes, value;
        array changed;

        let snapshot = this->snapshot;

        if unlikely typeof snapshot !== "array" {
            throw new SnapshotsDisabled(get_class(this));
        }

        /**
         * Return the models meta-data
         */
        let metaData = this->getModelsMetaData();

        /**
         * The reversed column map is an array if the model has a column map
         */
        let columnMap = metaData->getReverseColumnMap(this);

        /**
         * Data types are field indexed
         */
        if typeof columnMap !== "array" {
            let allAttributes = metaData->getDataTypes(this);
        } else {

View on GitHub (pinned to b7419de9cd)

When it happens

Trigger: Thrown at phalcon/Mvc/Model.zep:2081 when the library encounters an invalid state.

Common situations: See trigger scenarios.


AI-assisted analysis of phalcon/cphalcon@b7419de9cd (2026-08-21). Data as JSON: /api/errors/cd01f8a46af1a238. Report an issue: GitHub.