Skip to content

[4.x]: Auto save drafts behavior / Settings #13630

@LeoWie93

Description

@LeoWie93

What happened?

Description

The behavior of the following general setting option: https://craftcms.com/docs/4.x/config/general.html#autosavedrafts
does not behave as expected

.env

Setting the .env variable: CRAFT_AUTOSAVE_DRAFTS=false does nothing in our case.

Static config

The in the documentation mentiond ->autosaveDrafts(false) function is not implemented inside the GeneralConfig object. But we can still set the variable directly with ->autosaveDrafts = false. (Which is deprecated and tells us to use the non existing function)

Steps to reproduce

  1. have an entry that you can save
  2. add .env variable and change a field => still autosaves the draft
  3. add the ->autosaveDrafts = false => craft no longer autosaves the draft after a change

Expected behavior

  • the documented ->autosaveDrafts() can be used for the same result

Craft CMS version

4.4.17 & 4.5.3

PHP version

8.2

Operating system and version

ArchLinux 6.1.50-1-lts

Database type and version

Mysql 8.0.32

Image driver and version

Imagick

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions