Child pages
  • Content Autosave and Preview
Skip to end of metadata
Go to start of metadata

Imported From:


I think inportal CMS is missing a 2 commons and very usefull functions we can find in every serious content editor:

  • autosave content : need to create a "draft" state
    • avoid loosing work because session became inactive (IP change, session timeout)
    • prevent loss on browser crash
    • give ability to continue later, without publishing
    • preview content : view final page in new window
    • make sure of final content before being online (impossible actually)
    • test "look" without changing live pages
    • correct errors before they are "live"

The matter is we have 2 types of content, and the real "CMS" content is only accessible from a wysiwig editor, any idea on how to implement this? Maybe a link next to "Edit page", or later when editor is loaded?

Related Tasks

INP-915 - Getting issue details... STATUS


  1. If you are talking about just editing content blocks, then I don't know how
    you can preview page before saving, when you want to change 2 or more blocks
    together to get desired page content.

    Auto-save is good, but what happens, when 2 users are editing same content
    block. At the end they will have 2 different auto-saved versions of it and
    in result only 1 change will remain.

    Ability to continue later is good, but we don't have user-based page change
    tracking ability, so we can froze user change until it's got published. What
    about if some other user publishes his change before first user change is
    published. In this case 1st publisher will completely overwrite any changes,
    created by 2nd publisher.

    Change tracking is more complicated, since page consists of:

       1. page related fields (e.g. name, url)
       2. content blocks

    These all are located in 2 different tables. I personally can't imagine how
    we can track all those.

    Auto-save is good for Gmail, when you just have 1 textarea to save and 1
    user, who makes changes. Converting In-Portal to Google Docs with all that
    revision history doesn't seem to be a good idea to me.

    Phil, do you have any CMS that can do what you've described?

  2. well, yes, Wordpress is just doing this perfectly :-)

    When I talk about changes, it's about content only, not for title or page

    2011/1/24 Alexander Obuhovich <>

  3. Saving draft is not that big problem for content blocks, we have draft
    functionality in form submissions already, but how do you propose to display
    page new look, based on drafts?

    If so, then each content block value will be actually retrieved from latest
    current user draft, instead of live data?

  4. For content bloc, I propose to have next to "edit" button : "this page have
    draft, click here to view and edit"
    you clic, and we see the draft content instead of online one, with edit
    button, and next to it "delete draft"

    then when can edit the online page or the draft page.

    We can do in the other way: "edit" + "this is a draft - go to original page"

    And we still need a REAL "preview" link, because when we are in admin, the
    page never appears exactly as it should, due to "edit" buttons, unloaded JS,
    smaller width...

    2011/1/24 Alexander Obuhovich <>

  5. Here is new idea:

       - while editing content block automatic save is made each N minutes and
       a *new unapproved revision *(draft) is created
       - saving content block will actually create a draft (same as above)
       instead of saving changes directly to live table
       - once FCKEditor (used to edit content block) is closed then show page
       content block data from their draft version (when available) and show
       "Approve Changes" and "Discard Changes" buttons on top left corner of the
       page (like we do on "Design Mode", when some sidebox dragging was made

    If user will leave admin console and then return to it later, then he will
    see, that his draft version of page content blocks are shown (since "Approve
    Changes" and "Discard Changes" buttons will be already visible).

  6. Very sold idea Alex!

    I would through a couple more things in:

    1. Need to show a TimeStamp somewhere, perhaps by Approve / Discard buttons
    2. I would name buttons a little differently (not major)
    3. In case we if User leaves and comes back later we might want to show the
    current Live version with option to pull up Saved Draft so work can continue
    and saved/canceled later.

    What you think?


  7. Then in total there will be 4 buttons on the left:

       - Approve
       - Decline
       - Show From Live
       - Show From Drafts

    All buttons will be visible, when drafts will be available.

    Then one page revisiting user will see "Drafts Available. Click Here To Use
    Them" or something like that.

    At least some sound ideas at the end of the day.

    On Mon, Feb 21, 2011 at 9:23 PM, Dmitry A. <> wrote:
    > Very sold idea Alex!

    > I would through a couple more things in:

    > 1. Need to show a TimeStamp somewhere, perhaps by Approve / Discard buttons
    > 2. I would name buttons a little differently (not major)
    > 3. In case we if User leaves and comes back later we might want to show the
    > current Live version with option to pull up Saved Draft so work can continue
    > and saved/canceled later.

    > What you think?

    > DA

  8. Yes Alex, something like this!

    Also it will be nice to have Auto-Saved message to Show/Hide once it's been
    auto-saved ( i guess if any changes made since last auto-save )


  9. By the way, what makes us stop from having last 10 revisions from auto-save?

    Let's say I am making changes and before clicked Approve can see up to 10 of
    my revision back and choose which one I want to make Live!

    How does that sound?

    From interface point we can have something like Div Drop-down (JQuery) with
    list of Revisions with timestamp next to it?


  10. I'll recommend also here to have the "^preview" button while editing page,
    and this button opens a new tab to see how your actual changes looks like
    before saving, in conditions (yup, I'm just describing how WP works ^^)

    2011/2/21 Alexander Obuhovich <>

  11. Of course picking any specific revision will destroy all other revisions
    after it I guess.

    Phil, why new tab, then each Preview button click will open one more window.
    Saving a content block will display that preview right away with ability to
    rollback all changes made.

  12. you can display preview in the same tab on everychange (WP knows how to do
    so ^-^)

    it's just a suggestion here... as I don't like to see my content in admin

    2011/2/21 Alexander Obuhovich <>

  13. FCKEditor is shown in modal/popup window. Adding new tab there can't be done
    there, since:

       1. there are no tabs when modal windows are used
       2. you can't tell a window to open as new tab in a particular popup,
       since it's web-browser controlled (e.g. Chrome always opens tabs in main

  14. hmmmm... up to you guys, sadly we don't have any other feedback, personnally
    I never use modal windows :)

    2011/2/22 Alexander Obuhovich <>

  15. Here are more technical ideas on revision tracking system:

       - add PortalUserId, RevisionNumber, IsDraft to PageContent table
       - add LastRevisionNumber field to Category table (will be changed, when
       pending changes will be approved)
       - user can't approve content block, which has PageContent.RevisionNumber
       < Category.LastRevisionNumber
       - page preview in "Content Mode" will have non-approved revision (from
       current user) dropdown (e.g. 1, 5, 13)
       - each content block change will set it's revision to
       MAX(PageContent.RevisionNumber) + 1 from all non-approved revisions of
       content blocks on this page (from all users)
       - when viewing 5th page revision, then use this formula to get proper
       content block to show: *SELECT * FROM PageContent WHERE PageId = X AND
       Num = Z AND ( (RevisionNumber <= 5 AND PortalUserId = Y AND IsDraft = 1) OR
       (IsDraft = 0) ) ORDER BY RevisionNumber DESC*
       - when revision is approved, then it replaces live version of a content
       block being edited. This way we keep user_id, who last edited each content

  16. Hi Alex,

    For some reason I couldn't see your actual reply online in the group
    interfaces, but online via Email - some kind of issue on Google's side.

    Anyway, thanks for posting Technical part - very good start.

    I have though about this a lot in a past 6 hours and have some new ideas.
    I'll try to put together as a list below:

    *1.* each *Section (content page)* can have *N numbers* of *Revisions*

    *2.* each new *Revision* will be created once we Save the changes into Live.

    *3.* we need to be able to store *N number* of Revisions for each *Section,
    *number can be configurable (start with 20?)

    *4.* we need ability to switch (load) ANY of previous section Revisions so
    we can see it and Revert to it.

    *5.* reverting to a previous Revision will create a new Revision (basically
    current/new state of all Content Blocks)

    *6.* we need to be able Auto-Save directly from FCK (ajax?) into the Draft
    Revision (special special type of revision which is NOT Saved yet)

    *7. Draft* Revision is going to the latest Revision (only 1 draft which
    means current editing) until we Save the changes to Live. If we cancel Draft
    will go away (roll back to the previous Revision). Purpose of Draft is to be
    able to change the Content Blocks and then see it before it's Live, or
    cancel it (rolls back to prev. revision), or select any other previous/old
    revision to take a look and then Restore to it or go back to the Draft.

    *8.* all Revisions (including Draft) should be *User Specific *so one user

    *9. *ability to open Page in a pop-up (new tab) with a Draft or any other
    Previous Revision for Live Preview. Should be simple to do (need ability to
    specify revision number in URL)

    *10.* last but not least, ability to show when current Live Revision was
    saved and by who.

    I am attaching a little screenshot from Google Docs were we can see their
    approach about Revisions

    I know this can sounds a little too much, but I think we are getting VERY
    close to finalizing the specs for this and it's going to be a HUGE feature.


  17. *2. each new Revision will be created once we Save the changes into Live.
    Dmitry, here you say, that new revision will be created only, when saved to
    live. What about if I change page multiple times without approving it at all
    and I want to rollback to one specific change to use it?

    In my proposal revision is made each time a change occurs and when it got
    approved, that revision number gets copied to page record itself (so we can
    prevent accidental overwrites).

    *8. all Revisions (including Draft) should be User Specific so one user can*

    I think you've forgot to write what user actually can do :)

    In my approach user can have multiple drafts on the same page and then
    choose what of them to approve (last one by default). Google Groups actually
    keeps many drafts too, but it groups them on daily basis (e.g. 5 drafts on
    the same day by same user will look like 1 record).

    In your approach user can have 1 draft per page and then can revert to other
    versions of same page OR approve his draft.

    I really don't know what approach is better.

  18. Here are some more ideas:

       - always create empty content block (when missing) during page rendering
       - when saving content block, then create draft versions of all content
       blocks on this page
       - when content block is added, then create it's empty version for all
       past revisions

  19. Hi guys,

    To continue on this new idea we have kind of determined that each User will
    have it's own Draft (auto-saving of course) once beginning to edit the

    Now we need to describe:

    1. how Revisions should work across the Users and what is going to happen
    when 2+ Users are editing the same Section.
    2. are we going to allow saving User 1 changes when User 2 still editing his

    I am sure there are more questions to discuss.


  20. Showing "Users: <user1>, <user2> are now editing this page" would a good
    start, when several users (including current user) have draft versions of
    this page.

    Allowing user to see draft versions of the page from other users maybe not
    be a good idea, since he can create his version of page based on their draft
    without original draft author being aware of that.

  21. well, I'm against the function "each user have his own draft", for the
    following reasons:

    1- harder to deal with all theses versions of the same document...

    2- if an user publish his content, what will happens for the other user's

    3- it's usefull to ask one user to create a draft, an another one to
    validate it, but many users doing the same thing doesn't seems good to me

    4- if we setup permissions for each users for "create draft" and "publish
    draft", we will manage the publishing workflow, things only found on big CMS
    actually :-)

    2011/2/25 Alexander Obuhovich <>

  22. What exactly these big CMS are? What exactly useful features do they have?

    I'm asking, since I don't expect more from CMS to have ability to create
    pages and edit their content.

  23. the purpose of content flow management is : somes users can write content,
    some other ones can validate them for publication. In many administrations
    and big companies, it work like this.

    Even without this case, have more than one draft for one content seems
    impossible to administrate...

    2011/2/25 Alexander Obuhovich <>

  24. What about the case when 2 users are editing the same page. In your case 2nd
    user must wait until 1st user completes his action.

    Also you are proposing (with single draft) for 2nd user to start editing
    based on what 1st user have already created, but not yet approved.