cms icon indicating copy to clipboard operation
cms copied to clipboard

Editing entry from Nav discards unsaved changes

Open edalzell opened this issue 3 years ago • 4 comments

Bug description

Making a navigation, and I accidentally hit the 'Edit Entry' menu item from the 3 dots menu. When I clicked the < Page link I went back to the pages (of course), but all my unsaved nav changes were lost.

Would be great if it either auto-saved when you went to the edit entry page, or didn't allow you to continue until you have no unsaved changes (likely the easiest fix)/

How to reproduce

  1. Make a nav
  2. save
  3. add a few more nav items, at least one of them an entry
  4. click on the Edit Entry from the pop up menu
  5. click the < Pages link in the nav
  6. navigate back to Nav
  7. see none of the previous added items

Logs

No response

Environment

Environment
Application Name: Groundlings
Laravel Version: 9.26.1
PHP Version: 8.1.9
Composer Version: 2.4.1
Environment: local
Debug Mode: ENABLED
URL: groundlings-new.test
Maintenance Mode: OFF

Cache
Config: NOT CACHED
Events: NOT CACHED
Routes: NOT CACHED
Views: CACHED

Drivers
Broadcasting: log
Cache: statamic
Database: mysql
Logs: stack / daily
Mail: smtp
Queue: sync
Session: file

Statamic
Addons: 2
Antlers: runtime
Version: 3.3.32 PRO

Statamic Addons
aerni/font-awesome: 1.2.0
statamic/migrator: dev-master


### Installation

Fresh statamic/statamic site via CLI

### Antlers Parser

runtime (new)

### Additional details

_No response_

edalzell avatar Aug 29 '22 18:08 edalzell

What's the < Pages link? I feel like I'm missing something simple. Screenshot?

jasonvarga avatar Aug 29 '22 18:08 jasonvarga

Oh that must be the collection name. Nevermind.

When I click Edit Entry in the dropdown, I get the "are you sure you want to leave this page?" dialog. You don't get one of those?

jasonvarga avatar Aug 29 '22 18:08 jasonvarga

When I click Edit Entry in the dropdown, I get the "are you sure you want to leave this page?" dialog. You don't get one of those?

Correct, I do not get one of those.

edalzell avatar Aug 29 '22 18:08 edalzell

What browser?

jasonvarga avatar Aug 29 '22 22:08 jasonvarga

Hey 👋

I'm unable to reproduce this issue on the latest version of Statamic...

When I open the entry item in a stack and click "Edit Entry", the entry opens in a new tab and when I click "Edit Entry" in the nav item dropdown, I see a "are you sure you want to leave this page" dialog:

https://github.com/statamic/cms/assets/19637309/1d5d420e-79cd-46a0-9da5-761b2b6c6946

I'm going to close this issue now. If you're still experiencing this issue, please leave a comment and we can re-open the issue. Thanks!

duncanmcclean avatar Mar 28 '24 12:03 duncanmcclean