Posts: 423
Threads: 15
Joined: Mar 2011
2012-03-08, 19:17:11
(This post was last modified: 2012-03-08, 19:19:29 by dasganze.)
Hello,
I know that this issue came up with v3.0 and non-Latin characters, but I think it's a more general weakness.
If an attempt is made to save a new page without adding a title, any existing page content is lost.
Although focus is given to the Title field when a new page is created, it is entirely possible that content may be created first – for example, by pasting text and subsequently editing or formatting it.
It is then all too easy to click the 'Save' button and lose everything, with just the 'Error: You cannot save a page with an empty title or slug.' for consolation.
Would it be possible to either disable the 'Save' button until mandatory fields are complete, or at least not discard any editor content, please ? It's a better fit with the Principle of Least Astonishment. ;-)
--
Nick.
Posts: 1,848
Threads: 86
Joined: Aug 2009
agreed Hameau. I will add this to the issues list.
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 79
Threads: 2
Joined: Feb 2012
2012-03-08, 23:49:04
(This post was last modified: 2012-03-09, 06:28:22 by wiliambp.)
Here's a workaround [based on using the Innovation template] find the following page slug:
<h1><?php get_page_title(); ?></h1>
... add a class of hide,
<h1 class="hide"><?php get_page_title(); ?></h1>
and include that class in it's style sheet:
.hide {display: none;}
if using html5, [ Don't use the custom fields plug-in] ... just set up your own titling setup, for instance in an Hgroup:
<hgroup class="your class">
<h1>
----TITLE----
</h1>
<h2>
----SUB TITLE----
</h2>
</hgroup>
Posts: 3,491
Threads: 106
Joined: Mar 2010
I've tried removing (or commenting out) this in
admin/changedata.php (GS 3.1):
Line 64:
and above, lines 39 to 41:
Code:
if ( $_POST['post-title'] == '' ) {
redirect("edit.php?upd=edit-err&type=".urlencode(i18n_r('CANNOT_SAVE_EMPTY')));
} else {
Then, you get no error with pages with no title, and they are saved, but with slug
temp,
temp-1,
temp-2 ...
For me this is acceptable (BTW it seems this may be how GS worked in some very old version), though maybe I'd change that default slug 'temp' to 'page'.
Posts: 1,848
Threads: 86
Joined: Aug 2009
@carlos - what shows up in the 'All Pages' section?
-
Chris
Thanks for using GetSimple! - Download
Please do not email me directly for help regarding GetSimple. Please post all your questions/problems in the forum!
Posts: 3,491
Threads: 106
Joined: Mar 2010
They are listed like:
Code:
[No Title] » temp-1
[No Title] » temp-2
[No Title] » temp
and you can edit them by clicking on the links.
(I expected that the links wouldn't be visible, but line 883 in template_functions.php does this.)
Posts: 423
Threads: 15
Joined: Mar 2011
Just fell for this again today, forgetting that my local mods had been reverted by a GS upgrade. Any news, please?
--
Nick.
Posts: 1,108
Threads: 70
Joined: Aug 2009
Hi,
This has been sorted since version 3.1.1.
Is there any reason why you haven't upgraded to that version.
There are lots of bug fixes since 3.1
Posts: 423
Threads: 15
Joined: Mar 2011
(2012-11-08, 21:38:33)n00dles101 Wrote: This has been sorted since version 3.1.1.
Apparently not – this is a clean install of 3.1.2.
Are you thinking of preventing saving a page with a whitespace or empty title/slug? I remember that being fixed.
--
Nick.
Posts: 1,108
Threads: 70
Joined: Aug 2009
8) Yes your right. Misread the origianl post..
I'll log an issue for it now.
Posts: 6,266
Threads: 181
Joined: Sep 2011
I thought we were still saving temp files or temp names if there was a problem.
hmm, we ought to.