Craft session is operable but fails on save after device awakens from sleep
Nobody has claimed this yet.
- Dominant language
- PHP
- Stars
- 3.6k
- Forks
- 705
- Avg merge
- 1d 5h
- Merged PRs (30d)
- 134
Description
Description
In general.php I have set my 'userSessionDuration' to 0 so that I don't get logged out automatically.
When I close my laptop it goes to sleep. Upon opening it again and activating the tab with Craft I can still edit an entry I had left open when closing the laptop. I could edit for at least half an hour without any messages from Craft. When I then clicked the Save button I got an error message and all modifications were lost.
Is it possible for Craft to detect this state and auto-save on wake-up (best) or inform the user to salvage their updates in some way?
Steps to reproduce
- Start editing an entry
- Let device go into sleep mode
- Wake up device
- Continue editing the entry
- Click Save button
Additional info
- Craft version: Solo 3.4.17.1
- PHP version: 7.2.30
- Database driver & version: MySQL 10.2.31
- Plugins & versions: Cloudflare 0.5.0, Footnotes 2.0.0-beta.1, Matrix Colors 2.0.1, Redactor 2.6.1, SuperSort 3.0.1
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the session setting in general.php and trace the entry editing and Save flow described in the report. Reproduce the sleep/wake sequence with Craft 3.4.17.1, then define completion as preserving the edits or clearly warning the user before they are lost.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- php
- Domain
- full-stack
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 28/100