Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
GS3.1: Saving a page without a title clears page content.
#1
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.
Reply
#2
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!
Reply
#3
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>
Reply
#4
I've tried removing (or commenting out) this in admin/changedata.php (GS 3.1):

Line 64:
Code:
}

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'.
Reply
#5
@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!
Reply
#6
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.)
Reply
#7
Just fell for this again today, forgetting that my local mods had been reverted by a GS upgrade. Any news, please?
--
Nick.
Reply
#8
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
My Github Repos: Github
Website: DigiMute
Reply
#9
(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.
Reply
#10
8) Yes your right. Misread the origianl post..

I'll log an issue for it now.
My Github Repos: Github
Website: DigiMute
Reply
#11
I thought we were still saving temp files or temp names if there was a problem.
hmm, we ought to.
NEW: SA Admin Toolbar Plugin | View All My Plugins
- Shawn A aka Tablatronix
Reply




Users browsing this thread: 2 Guest(s)