In-Portal Issue Tracker

Welcome to the In-Portal Open Source CMS Issue Tracker! This is a central management / tracking tool for all types of tasks / issues / bugs for the In-Portal Project. Before reporting any issues, please make sure to read the Guide into Issue Tracker and How to Properly Test and Report Bugs!

Viewing Issue Simple Details Jump to Notes ] Wiki ]  Related Changesets ] View Advanced ] Issue History ] Print ]
ID Category Type Reproducibility Date Submitted Last Update
0001117 [In-Portal CMS] Admin Interfaces feature request always 2011-09-07 18:38 2012-07-25 05:32
Reporter Dmitry View Status public Project Name In-Portal CMS
Assigned To alex Developer
Priority normal Resolution fixed Fixed in Version 5.2.0-B1
Status closed Product Version 5.1.1 Target Version 5.2.0
Time Estimate1 hours total (1 hours remaining)
Summary 0001117: Version Control for Sections
Description There is a need to develop new Version Control system for SMS Sections. This would include Auto-Save and Approval (Public/Decline) system allowing users to manage the content.

See attached interfaces (images).


Actions


1. Each user can have only 1 Draft at a time. Draft is the Revision of the page that he is Editing until he actually saves it.

2. User can "Preview" his Draft at any point - it will open a pop-up (or tab) with a Front-end of that page showing how his Draft will look when published live.

3. User can "Discard" his Draft at any point and it will delete/clear all changes.

4. User can "Save" his Draft and it becomes a Revision:
  a. Revision will become Public right away ONLY if User had Permissions to piblish to Live
  b. Revision will become Pending if User did NOT have Permissions to piblish to Live

5. User can "Load" other Revisions and if has special permissions and "Approve" / "Decline" Pending Revisions submitted by other users.

6. User can "Load" other Revisions and if has special permissions and "Restore" to previous revisions.

7. Any time user start Content Block Editing (clicks on Edit) and pop-up (or modal window) loaded, system will create/update a Draft of this page if there wasn't one already. This is directly related to the Auto-save functionality in that Editing pop-up.
Additional Information Additional tasks in In-B:

#33461 - Versions Control & Editorial Interfaces
#33701 - Implement "Versions Control & Editorial Interfaces"


Plan of Development / TODO:

1. create PageRevisions table with following fields:
- RevisionId, PageId, RevisionNumber, IsDraft, FromRevisionNumber, CreatedById, CreatedOn, Status

2. add LastRevisionNumber field to Category table (will be set to last pending revision, that was approved OR to last revison, when approval isn't used)

3. add RevisionId, ContentAutoSaved field to PageContent table

4. user can't approve revision, which has PageRevisions.FromRevisionNumber < Category.LastRevisionNumber

5. when viewing 5th page revision, then use this formula to get proper content block to show:
SELECT pc.*
FROM PageContent pc
JOIN PageRevisions pr ON pr.PageId = pc.PageId
WHERE pc.PageId = X AND pc.Num = Z AND ( (pr.RevisionNumber = 5 AND pr.CreatedById = Y AND pr.IsDraft = 1) OR (pr.IsDraft = 0 AND pr.Status = 1) )
ORDER BY pr.RevisionNumber DESC

6. when creating a draft, then copy all page content blocks to it

7. drafts don't have revision number until then are officially saved (IsDraft = 0 -> IsDraft = 1 - generate new revision number)

8. when content block is added (e.g. page design changes), then create it's empty version for all past revisions

9. create following new permissions:
- CATEGORY.REVISION.MODERATE
- CATEGORY.REVISION.ADD
- CATEGORY.REVISION.ADD.PENDING
- CATEGORY.REVISION.HISTORY.VIEW
- CATEGORY.REVISION.HISTORY.REVERT

10. to preview any revision from past you need to have CATEGORY.REVISION.HISTORY.VIEW permissions & pass "revision=N" in url of that page. In this mode any existing drafts won't override given revision number. Also this will force "Browse Mode" to be used, so no editable content blocks.

11. when viewing revision from a history OR own draft, then hide "Publish, Decline" button

12. when viewing revision from a history show "Restore" button

13. clicking on Restore button (only, when user has CATEGORY.REVISION.HISTORY.REVERT permission) will create new revision from currently viewed revision and make it live/pending, based on user permissions

14. display current revision (live or viewed from history) number, author, creation time

15. if user already has a draft, then it will be used instead of creating new draft

16. when content block editor window is opened & auto-save happens, then current editor content is saved into ContentAutoSaved column instead of Content column. This is done so user can click "Cancel" toolbar button and see intact page content from moment he opened content block editing window

17. when user clicks "Save" button in content block editing windows, then do "auto save" + move content from ContentAutoSaved to Content column

18. we need to be able to store N number of Revisions for each Section, number can be configurable (start with 20?). This way when 21th revision is created, then 1st is deleted.

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

20. clicking on a revision from history will load this revision (then Preview button will view this revision in a popup) if it has CATEGORY.REVISION.HISTORY.REVERT or CATEGORY.REVISION.MODERATE permissions

21. create draft (when missing) when content block is changed, instead of saving changes right to it

---------------------------

What toolbar buttons do:
- "Save" will save the revision but will NOT publish to the site (depending on a permissions)
- "Discard" will permanently delete draft

- "Publish" will publish to the website (when user has permission to do that)
- Deny (will return the revision into the draft state for someone to continue working with - it would be nice to be able to specify a reason for it!)

- "Preview" will show you the preview without saving or publishing (only for drafts)
- "Restore" will restore the currently selected revision and will publish it (depending on permission)

Tags No tags attached.
Reference https://groups.google.com/d/topic/in-portal-dev/z1iShTzm-xk/discussion
Change Log Message Added Version Control feature for Sections
Estimate Points 3
Attached Files jpg file icon Versions_Control_Editorial_Interfaces_3_c.jpg [^] (357,440 bytes) 2011-09-07 18:40
jpg file icon Versions_Control_Editorial_Interfaces_3_a1.jpg [^] (374,510 bytes) 2011-09-07 18:40
jpg file icon Versions_Control_Editorial_Interfaces_3_b1.jpg [^] (384,337 bytes) 2011-09-07 18:40
zip file icon intechnic4_html.zip [^] (895,389 bytes) 2011-09-07 18:40
rar file icon images_v2.rar [^] (24,295 bytes) 2011-09-07 18:43
patch file icon cms_revision_control_feature_v8.patch [^] (98,301 bytes) 2011-09-07 18:44 [Show Content]
rar file icon Versions_Control_Editorial_Interfaces_3.rar [^] (443,352 bytes) 2011-09-08 09:41
patch file icon cms_revision_control_feature_520.patch [^] (99,239 bytes) 2011-12-08 11:02 [Show Content]
patch file icon page_revision_upgrade_fix.patch [^] (426 bytes) 2012-01-06 10:33 [Show Content]
patch file icon setting_to_enable_page_revision_control.patch [^] (12,998 bytes) 2012-01-16 10:45 [Show Content]
patch file icon sql_error_on_page_revision_delete.patch [^] (628 bytes) 2012-01-17 03:27 [Show Content]

- Relationships Relation Graph ] Dependency Graph ]
parent of 0001250closed (1.2.0) Advanced SQL Errors on Demo Content insertion during Installation 
parent of 0001252closed (1.2.0)alex Simple SQL Errors on Demo Content insertion during Installation 
parent of 0001251closed (5.2.0)alex Default SQL Errors on Demo Content insertion during Installation 
parent of 0001264closed (5.2.0)alex In-Portal CMS Content Revision toolbar in Content Mode goes away during page scroll 
parent of 0001274closed (5.2.0)alex In-Portal CMS Multiple issues with Content Revision Tracking 
related to 0001244closed (5.2.0)alex In-Portal CMS Content block changes not saved, when switching language in editing window 

-  Notes
User avatar (0003726)
Dmitry (manager)
2011-09-07 18:44

This task is ready for testing
User avatar (0003754)
Dmitry (manager)
2011-09-16 11:12

Moved back to 5.2.0.
User avatar (0003877)
Dmitry (manager)
2011-09-23 20:37

Needs to be implemented in 5.2.0 (PHP 5 format)
User avatar (0004234)
alex (manager)
2011-12-08 11:01

Fix committed to 5.2.x branch. Commit Message:

Fixes 0001117: Version Control for Sections
User avatar (0004396)
alex (manager)
2012-01-06 10:34

Patch "page_revision_upgrade_fix.patch" fixes upgrade script, that created missing PageRevisions for pages, that have content blocks.
User avatar (0004420)
alex (manager)
2012-01-17 03:27
edited on: 2012-01-17 03:29

Also noticed, that deleting pages with content blocks results in sql error (while in debug mode). Patch "sql_error_on_page_revision_delete.patch" fixes it.

Where was the problem:
1. when deleting a category, then also all it's sub-items are deleted as well
2. SELECT sql is made to get all details about item being deleted before deleting it
3. SELECT sql for page revisions failed since it used JOIN instead of LEFT JOIN to Categories table record, that was already deleted

User avatar (0004989)
alex (manager)
2012-07-25 05:32

Since 5.2.0 version was released.

- Related Changesets
In-Portal CMS: 5.2.x r15056
Timestamp: 2012-01-17 03:28:11
Author: alex
Details ] Diff ]
Bug 0001117: Version Control for Sections
1. deleting page with content blocks resulted sql error
mod - /in-portal/branches/5.2.x/core/units/page_revisions/page_revisions_config.php Diff ] File ]
In-Portal CMS: 5.2.x r15051
Timestamp: 2012-01-16 10:46:07
Author: alex
Details ] Diff ]
Bug 0001117: Version Control for Sections
1. setting to enable whole revision system
mod - /in-portal/branches/5.2.x/core/admin_templates/categories/edit_content.tpl Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/categories/categories_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/content/content_eh.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/page_revisions/page_revision_eh.php Diff ] File ]
In-Portal CMS: 5.2.x r15001
Timestamp: 2012-01-06 10:36:38
Author: alex
Details ] Diff ]
Bug 0001117: Version Control for Sections
1. fixes upgrade script, that created missing PageRevisions for pages, that have content blocks
mod - /in-portal/branches/5.2.x/core/install/upgrades.php Diff ] File ]
In-Portal CMS: 5.2.x r14856
Timestamp: 2011-12-08 11:01:53
Author: alex
Details ] Diff ]
Fixes 0001117: Version Control for Sections
mod - /in-portal/branches/5.2.x/core/admin_templates/categories/edit_content.tpl Diff ] File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/toolbar/tool_history.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/toolbar/tool_history_f2.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/toolbar/tool_history_f3.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/toolbar/tool_preview.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/toolbar/tool_preview_f2.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/toolbar/tool_preview_f3.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/button_vp_left.png File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/button_vp_right.png File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/button_vp_right2.png File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/close_black.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/close_white.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/history_bottom.png File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/history_item_background.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/history_item_background_hover.gif File ]
add - /in-portal/branches/5.2.x/core/admin_templates/img/top_frame/revision_control/message_background_red.png File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/incs/cms.css Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/js/script.js Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/js/template_manager.js Diff ] File ]
mod - /in-portal/branches/5.2.x/core/admin_templates/js/toolbar.js Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/english.lang Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/install_data.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/install_schema.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/remove_schema.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/upgrades.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/install/upgrades.sql Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/application.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/constants.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/db/db_event_handler.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/kernel/languages/phrases_cache.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/categories/categories_config.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/categories/categories_tag_processor.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/content/content_config.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/content/content_eh.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/helpers_config.php Diff ] File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/minifiers/minify_helper.php Diff ] File ]
add - /in-portal/branches/5.2.x/core/units/helpers/page_helper.php File ]
mod - /in-portal/branches/5.2.x/core/units/helpers/permissions_helper.php Diff ] File ]
add - /in-portal/branches/5.2.x/core/units/page_revisions File ]
add - /in-portal/branches/5.2.x/core/units/page_revisions/page_revision_eh.php File ]
add - /in-portal/branches/5.2.x/core/units/page_revisions/page_revision_tp.php File ]
add - /in-portal/branches/5.2.x/core/units/page_revisions/page_revisions_config.php File ]
mod - /in-portal/branches/5.2.x/core/units/structure/structure_config.php Diff ] File ]

- Issue History
Date Modified Username Field Change
2012-07-25 05:32 alex Note Added: 0004989
2012-07-25 05:32 alex Status resolved => closed
2012-05-11 11:27 alex Relationship added parent of 0001274
2012-04-23 11:49 alex Relationship added parent of 0001264
2012-04-06 10:00 Dmitry Relationship added parent of 0001251
2012-04-06 10:00 Dmitry Relationship added parent of 0001252
2012-04-06 09:59 Dmitry Relationship added parent of 0001250
2012-04-03 05:27 alex Relationship replaced related to 0001244
2012-04-03 05:25 alex Relationship added parent of 0001244
2012-01-17 03:29 alex Note Edited: 0004420 View Revisions
2012-01-17 03:28 alex Changeset attached 5.2.x r15056
2012-01-17 03:27 alex File Added: sql_error_on_page_revision_delete.patch
2012-01-17 03:27 alex Note Added: 0004420
2012-01-16 10:46 alex Changeset attached 5.2.x r15051
2012-01-16 10:45 alex File Added: setting_to_enable_page_revision_control.patch
2012-01-16 10:45 alex Relationship added related to 0001038
2012-01-06 10:36 alex Changeset attached 5.2.x r15001
2012-01-06 10:34 alex Note Added: 0004396
2012-01-06 10:33 alex File Added: page_revision_upgrade_fix.patch
2011-12-08 11:02 alex File Added: cms_revision_control_feature_520.patch
2011-12-08 11:01 alex Changeset attached 5.2.x r14856
2011-12-08 11:01 alex Note Added: 0004234
2011-12-08 11:01 alex Status needs work => resolved
2011-12-08 11:01 alex Fixed in Version => 5.2.0-B1
2011-12-08 11:01 alex Resolution open => fixed
2011-12-08 11:01 alex Assigned To !COMMUNITY => alex
2011-10-22 05:39 alex Estimate Points => 3
2011-09-26 04:55 alex Time Estimate Added 1
2011-09-23 20:37 Dmitry Note Added: 0003877
2011-09-23 20:37 Dmitry Status needs testing => needs work
2011-09-16 11:12 Dmitry Note Added: 0003754
2011-09-16 11:12 Dmitry Target Version 5.1.3 => 5.2.0
2011-09-08 09:41 Dmitry File Added: Versions_Control_Editorial_Interfaces_3.rar
2011-09-07 18:45 Dmitry Developer Dmitry => alex
2011-09-07 18:44 Dmitry Note Added: 0003726
2011-09-07 18:44 Dmitry Assigned To => !COMMUNITY
2011-09-07 18:44 Dmitry Developer => Dmitry
2011-09-07 18:44 Dmitry Status active => needs testing
2011-09-07 18:44 Dmitry File Added: cms_revision_control_feature_v8.patch
2011-09-07 18:43 Dmitry File Added: images_v2.rar
2011-09-07 18:43 Dmitry Additional Information Updated View Revisions
2011-09-07 18:40 Dmitry File Added: intechnic4_html.zip
2011-09-07 18:40 Dmitry File Added: Versions_Control_Editorial_Interfaces_3_b1.jpg
2011-09-07 18:40 Dmitry File Added: Versions_Control_Editorial_Interfaces_3_a1.jpg
2011-09-07 18:40 Dmitry File Added: Versions_Control_Editorial_Interfaces_3_c.jpg
2011-09-07 18:38 Dmitry New Issue
2011-09-07 18:38 Dmitry Reference => https://groups.google.com/d/topic/in-portal-dev/z1iShTzm-xk/discussion
2011-09-07 18:38 Dmitry Change Log Message => Added Version Control feature for Sections



Web Development by Intechnic
In-Portal Open Source CMS
In-Portal Open Source CMS
Copyright © 2000 - 2009 MantisBT Group

Powered by Mantis Bugtracker