Private pages

1 view
Skip to first unread message

Paul Stovell

unread,
Jan 16, 2011, 7:34:17 PM1/16/11
to funnel...@googlegroups.com
Thinking about this issue (delete feature):


Paul Jenkins sums it up on Twitter:

@mabster except that they're still indexed by google/publically accessible if you guess the url, which can be annoying

I'm wary of implementing a "hard delete" feature though, because if you want to bring the page back to life at some point, it's gone. 

What might be better is to mark a page as being "private". When you do that, only logged in users can see the page - for everyone else it 404's. So in effect it's a delete, but you can always unhide it later. 

It would also be useful to hide any pages as you're composing them, then unhide them when you publish. 

What do you think? 

Paul

Aaron Powell

unread,
Jan 16, 2011, 7:35:26 PM1/16/11
to funnel...@googlegroups.com
Yeah, have an IsDeleted flag on the entity, and if you're logged in you can get to it, otherwise it'll 404
Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com

Aaron Powell

unread,
Jan 16, 2011, 7:36:28 PM1/16/11
to funnel...@googlegroups.com
But it'd be good if you could also set it up as a 302 not a 404.

Only issue with 302 is existing comments, can you migrate them to the new page...

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 16, 2011, 7:53:43 PM1/16/11
to funnel...@googlegroups.com
I think our edit feature just needs to be smarter. At the moment it does this:
  1. Get the page name from the TextBox
  2. Find the entry by that name - if it doesn't exist, create it
  3. Revise the entry and save it
It's too dumb to know that you're just renaming the page. 
  1. Get the new page name from the TextBox
  2. Find the entry by the OLD page name, passed from a hidden input
  3. Revise the entry, assign the new page name, and save it
Paul

Aaron Powell

unread,
Jan 16, 2011, 7:57:26 PM1/16/11
to funnel...@googlegroups.com
You sure, cuz I just changed the URL and now I have two identical posts...

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 16, 2011, 7:59:34 PM1/16/11
to funnel...@googlegroups.com
That's what I mean - you changed the URL (the name), so it thought "I can't find an old entry by that name, best create a new one".

What it *should* do, when we change the code, is to realize you just changed the name, and update the old entry name accordingly.

Paul

Aaron Powell

unread,
Jan 16, 2011, 8:02:10 PM1/16/11
to funnel...@googlegroups.com
Oh, I thought that name was referring to page title.

And yeah, that wouldn't be an integrity concern as the name isn't a UID is it?

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Paul Stovell

unread,
Jan 16, 2011, 8:05:42 PM1/16/11
to funnel...@googlegroups.com
I think there is a UNIQUE constraint on name, but we don't use it as the FK for anything (they have int ID's)

Aaron Powell

unread,
Jan 16, 2011, 8:18:46 PM1/16/11
to funnel...@googlegroups.com
If it's just a constraint it should be fine to update the record

Aaron Powell
Umbraco Core Team Member

http://www.aaron-powell.com | http://twitter.com/slace | Skype: aaron.l.powell | MSN: aaz...@hotmail.com


Reply all
Reply to author
Forward
0 new messages