Page preview can "clutter" your site

Status: Implemented

Created by Ed Johnson 13 Jul 2010 14:22

rating: +2+x

**STE **

I'm not sure if this is really a bug, but it is something that could use some discussion.

The preview function is awesome, but if you're not careful you can end up with a lot of "clutter" in the category you choose to use for your previews (in theory, up to 100 preview pages can exist). I wonder if there's a better way to handle this.

My first thought is to leave it alone, but make sure the docs explain a "best practices" for configuring your preview settings. For example, it could be dangerous if you choose an autonumbered category and the preview page wipes out an existing page in the category. If you want to make use of the preview function, it makes the most sense to me to create a dedicated category on your site for that purpose.

It would be great if the preview could clean up after itself by deleting the preview page (or prompting for that option), but I don't think the API supports page deletion at this point.

Another option would be for STE to check to see if the random preview page already exists and then prompt to overwrite it.

My last thought is to let us define a single preview page that simply gets overwritten each time we do a preview. However, this could be a problem for multiple editors on a site.


wdavatar?user=leiger
leiger

13 Jul 2010 22:34. Edited 1 times. (Edit, Permalink)
The main issue is that I needed a way of doing this that worked for people that don't have an API key. They're all creating pages as 'STEBot' on preview.wikidot.com — and that means that there needs to be a way to avoid conflicts… thus the randomly generated page number.

As it's a bit more difficult to suddenly change how I'm doing things just because someone is using their own key, I stuck with the same method for private sites as well. I only added the option to define a category later (was originally planning to just let users change the site name)

STE could generate a list of all pages in a specific category, so it's possible for me to add a "clean up" option that would give you a list of pages to manually delete. If deleting pages is ever added to the API - which I doubt it will be - STE would then do that itself.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

14 Jul 2010 01:12. Edited 1 times. (Edit, Permalink)

STE could generate a list of all pages in a specific category, so it's possible for me to add a "clean up" option that would give you a list of pages to manually delete. If deleting pages is ever added to the API - which I doubt it will be - STE would then do that itself.

Now that I've slept on this, I don't think it's really that big of a deal. Although 100 potential pages is a lot. How about reducing that number or let us pick the random number multiplier. For a single editor, I can't think of a reason you'd need to reserve more than a few pages for previews (only because you may want to have multiple preview pages open at once for some reason).

Instead of the list of pages, maybe a ListPages code block that we can place on our preview site with linked titles would be better.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

12 Oct 2010 12:53. Edited 0 times. (Edit, Permalink)
I'm thinking that I should remove the ability to preview documents if you don't have an API key. Currently, it uses STEBotSTEBot to preview pages if you don't have an API key (or have one but don't enter it into STE!).

Whilst this means that many people won't be able to preview pages any more, it will mean that I can make it more consistent. i.e. For Import, Export and Preview you need an API key. If you don't have one, you can't use those features. Easy to understand.

And I can make preview only happen on one page. You give the page name you want to preview, and I'll drop support for previewing two different things at the same time.

Sound good?

Included page "inc:signature" does not exist (create it now)

wdavatar?user=ed-johnson
Ed Johnson

12 Oct 2010 15:12. Edited 0 times. (Edit, Permalink)

I should remove the ability to preview documents if you don't have an API key

I agree completely.

Included page "inc:signature" does not exist (create it now)

wdavatar?user=leiger
leiger

19 Oct 2010 06:14. Edited 0 times. (Edit, Permalink)
For now, when I was updating this feature to work with the v2 API methods, I've added in a check to see if the page name has changed after saving. Essentially, this should mean it works with autonumbered categories now and you can have some control over what page names it creates (it will start at 1 and increase…)

I won't mark this as completed, because it still needs work. But thought I'd mention that here.

Included page "inc:signature" does not exist (create it now)

Post Reply

Add reply on "Page preview can "clutter" your site"

CSS Theme, Images and Code on this website are © Shane Smith 2010-2012. All forum posts by users and documentation licensed under Creative Commons BY-NC-SA 3.0 License.