Page MenuHomeIn-Portal Phabricator

INP-1590 - Add sub-item support to "AdminEditButton" tag
ClosedPublic

Authored by alex on Oct 27 2016, 5:59 AM.

Details

Test Plan
NOTE: Use non-root administrator account, when performing login to Admin Console.

Preparations

  1. in Admin Console
    • go to Website & ContentStructure & DataNews section
    • click on Articles tab
    • create a new article with 3 images (1 primary image and 2 additional images)
  2. in IDE:
    • open /themes/advanced/in-news/articles/article_detail.tpl template for editing
    • change additional_image_element block content to include <inp2:AdminEditButton template="in-news/articles/images_edit"/> before A tag, that has IMG tag inside it
    • add <inp2:n_AdminEditButton template="in-news/articles/articles_edit"/> tag before <inp2:n_Field name="Title"/> tag (article title)

Test Plan 1

  1. in Admin Console
    • go to Website & ContentBrowse Website section
    • click on Content Mode button in top frame
    • click on green Section Properties button in top right corner
    • confirm, that popup/modal window was opened with current page data being displayed in it
    • confirm, that in opened window the temp mode is being used by looking at debugger SQLs
    • try changing category fields and/or it's sub-item (e.g. image) fields
    • save changes
    • confirm, that changes were saved successfully by looking at that category directly from Website & ContentStructure & Data section

Test Plan 2

  1. in Admin Console
    • go to Website & ContentBrowse Website section
    • click on Content Mode button in top frame
    • click on orange Edit Content button
    • confirm, that popup/modal window was opened with selected content block data being displayed in it
    • confirm, that in opened window live mode is being used by looking at debugger SQLs
    • change content block data
    • save changes
    • confirm, that changed content block data appears immediately on the page

Test Plan 3

  1. in Admin Console
    • go to Website & ContentBrowse Website section
    • click on Content Mode button in top frame
    • go to News category using Top Menu
    • open detail page of article, that was created before
    • confirm, that green Edit Item buttons appear next to each additional image of that article
    • confirm, that clicking these buttons will open popup/modal window:
      • in opened window the temp mode is being used by looking at debugger SQLs
      • without warnings/notices in debugger
      • the blue bar text will be correct (as if we're editing an article from admin console)
      • any changes made can be properly saved
      • after saving changes we're staying on same page (article detail page) and see changes applied (e.g. alt change on the image)

Test Plan 4

  1. in Admin Console
    • go to Website & ContentBrowse Website section
    • click on Content Mode button in top frame
    • go to News category using Top Menu
    • open detail page of article, that was created before
    • confirm, that green Edit Item button appear next to article title
    • confirm, that clicking that button will open popup/modal window:
      • in opened window the temp mode is being used by looking at debugger SQLs
      • without warnings/notices in debugger
      • the blue bar text will be correct (as if we're editing an article from admin console)
      • any changes made can be properly saved
      • after saving changes we're staying on same page (article detail page) and see changes applied (e.g. title/body change of the article)

Diff Detail

Repository
rINP In-Portal
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

alex updated this revision to Diff 605.Oct 27 2016, 5:59 AM
alex retitled this revision from to INP-1590 - Add sub-item support to "AdminEditButton" tag.
alex updated this object.
alex edited the test plan for this revision. (Show Details)
alex added 1 JIRA issue(s): INP-1590.
alex edited edge metadata.Oct 27 2016, 6:00 AM
alex added a project: Restricted Project.
erik requested changes to this revision.Nov 11 2016, 4:59 AM
erik edited edge metadata.

SQL error happens when trying open window to edit image. There differs table names, adressed by SQL request and created in DB. See attached screenshots of SQL error and PMA tables list. On screenshot table name, created in DB, has additional element "_12" after SID.

This revision now requires changes to proceed.Nov 11 2016, 4:59 AM
alex edited the test plan for this revision. (Show Details)Nov 15 2016, 2:20 PM
alex edited edge metadata.
alex edited the test plan for this revision. (Show Details)Nov 15 2016, 2:22 PM
alex updated this revision to Diff 614.Nov 15 2016, 2:25 PM
alex edited edge metadata.

Fixing these issues:

  • the SQL error, when editing article image
  • no temp mode was used, when editing sub-items
erik accepted this revision.Nov 28 2016, 4:57 AM
erik edited edge metadata.
This revision is now accepted and ready to land.Nov 28 2016, 4:57 AM
erik added a comment.Nov 28 2016, 5:08 AM

There were errors when applying patch (through arc patch D253 command). Some changes not apply automatically. Applied manually before tests.

alex updated this revision to Diff 657.Dec 4 2016, 12:49 PM
alex edited edge metadata.

Recreating patch to avoid conflicts during applying.

alex planned changes to this revision.Dec 20 2016, 2:40 PM

When trying to edit content when non-root user is logged-in to the Admin Console getting No Permission error for c:OnStoreSelected event.

alex edited the test plan for this revision. (Show Details)Dec 20 2016, 2:47 PM
alex updated this revision to Diff 661.Dec 20 2016, 3:04 PM

Fixing No Permission error, when pressing Edit Content button while being logged-in by non-root user.

This revision is now accepted and ready to land.Dec 20 2016, 3:04 PM
alex requested a review of this revision.Dec 20 2016, 3:04 PM
alex edited edge metadata.

Please test.

erik accepted this revision.Dec 21 2016, 4:24 AM
erik edited edge metadata.
This revision is now accepted and ready to land.Dec 21 2016, 4:24 AM
alex updated this revision to Diff 764.Jul 16 2017, 7:03 AM

Rebuilding patch to fix conflicts during apply.

This revision was automatically updated to reflect the committed changes.