Geeklog-Core / geeklog

Geeklog - The Secure CMS.
https://www.geeklog.net
24 stars 19 forks source link

Staticpage Editor Doesn't Remember Some Settings on Reload of Editor #1013

Closed eSilverStrike closed 2 years ago

eSilverStrike commented 4 years ago

If you say forgot to input a title in the staticpage editor it will display a message and reload the editor when the user clicks save.

The problem is some editor settings are not remembered for the staticpage you are editing when this happens as this uses data from the page (post data) instead of from the database like with a regular initial edit or clone of the staticpage which uses the same function "staticpageeditor" from the admin index.php file.

This was partially fixed her for most checkboxes (as post data stores "on" instead of "1" in the database)

See commit 0e09b5f27b16b09ff3c336c5aededc915e0c5b4c

But is not fixed for permissions checkboxes or for the Topic Selection. I believe all the other dropdown and text field stuff is fine but we should double check all fields are returned properly when an editor error message is returned along with the editor.

Note: The topic selection has a function that can reselect the topic selection for situations like this. Check the article editor to see how this is done.