Skip to content
Grav 2.0 is officially stable. Read the announcement →
Plugins

Clearing of the page content while editing in admin plugin in the Grav 2.0

admin plugin

Solved by pamtbaau View solution

Started by Vladimir Novak 4 days ago · 3 replies · 145 views
4 days ago

After successfully upgrading from Grav 1.7 to Grav 2.0, I noticed an annoying feature of version 2.0: page reloads while editing.

In version Grav v2.0.17, Admin v2.0.19 after 53 minutes after page creation all entered text of the page is cleared and "Save" button is inactive (grayed out). As far as I remember, in version 1.7, after a period of inactivity, I was redirected to the login page, and I clicked "back" and copy text to clipboard and paste it to the same article after the login. Now in version Grav 2 all content is completely vanished during editing.

Please, make improvement in future version not to reload page after 53 minutes.

4 days ago

Andy, I found that in Grav 2.0 there must be file in the folder /user/config , the file named "admin-next.yaml" with user rights 600.

On my production site there is no file "admin-next.yaml", because the last steps of migration was not performed accordingly.

My unsaved edits is lost due to absence of this file:

./grav/user/config/admin-next.yaml

or if file exist, the value of the parameter is wrong:

settings:

TXT
autoSaveEnabled: false

The cause of the problem: parameter "autoSaveEnabled:" - must be "true"!!!

If file admin-next.yaml non-existent or autoSaveEnabled: false, after 50 minutes article text is cleared. I tested this on local web site.

Solution is to copy file "admin-next.yaml" to its place ./grav/user/config/ and change text in it:
settings:

TXT
autoSaveEnabled: true

Or in Grav 2.0 - left sidebar, click link "Settings" - menu "Site Defaults" - chapter "Editing" - parameter "Auto save" (default was: Off) !

Changed this parameter "Auto-Save" to "On". Clicked button "Save site defaults".
Now all text of the article is written to the file as I enter or edit it.

Thanks for your answer!

last edited 08/11/26 by Vladimir Novak

Suggested topics

Topic Participants Replies Views Activity
Plugins · by Mathieu Lecouturier, 2 weeks ago
3 230 1 week ago
Plugins · by Slebeig, 1 month ago
1 367 1 month ago
Plugins · by Rene, 2 months ago
2 531 2 months ago
Plugins · by Xavier, 3 months ago
2 446 3 months ago
Plugins · by Luka Prinčič, 7 years ago
3 1675 3 months ago