Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-26501

In-edit Locations window (legacy) should not force "Visible" flag

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: High High
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      Description

      Work done to address https://jira.ez.no/browse/EZP-22260 also included this specific commit, whose goal was to save the user's selection of the "hidden flag" toggle in the Locations window in edit mode:

      https://github.com/ezsystems/ezpublish-legacy/commit/c3e8ff555964b165bf4b0872baa9014818086a59

      However, that commit caused the following undesired effects:

      • "Visible" is the new default in the Locations window, not "Unchanged"
      • "Visible" overrides any hide effort of a workflow
      • Selecting "Unchanged" as a user and then saving the draft actually saves the selection as "Visible"

        Activity

        Hide
        Peter Keung added a comment -

        Given that:

        • The Locations window in edit mode is only enabled for first drafts. (Ref: http://share.ez.no/learn/ez-publish/node-visibility-hiding-and-revealing-content/(page)/4#eztoc2634_0_4)
        • A node's hidden flag is technically only hidden or not. (Hidden by superior is derived from the parent.)
        • By default a node's hidden flag is "off".
        • The use of the Locations window in edit mode is only for hiding the node; otherwise its hidden flag is technically "unchanged".
        • The effects of the Locations window in edit mode are applied after the content/publish/after trigger.
        • The effects of the Locations window can thus unexpectedly override a content/publish/after workflow if "Visible" is selected.

        This is technically true:

        • The "Visible" option is never valid (or at least not a more accurate description than "Unchanged"). Thus it should not be used.
        Show
        Peter Keung added a comment - Given that: The Locations window in edit mode is only enabled for first drafts. (Ref: http://share.ez.no/learn/ez-publish/node-visibility-hiding-and-revealing-content/(page)/4#eztoc2634_0_4 ) A node's hidden flag is technically only hidden or not. (Hidden by superior is derived from the parent.) By default a node's hidden flag is "off". The use of the Locations window in edit mode is only for hiding the node; otherwise its hidden flag is technically "unchanged". The effects of the Locations window in edit mode are applied after the content/publish/after trigger. The effects of the Locations window can thus unexpectedly override a content/publish/after workflow if "Visible" is selected. This is technically true: The "Visible" option is never valid (or at least not a more accurate description than "Unchanged"). Thus it should not be used.
        Hide
        Peter Keung added a comment -

        PR: https://github.com/ezsystems/ezpublish-legacy/pull/1266

        === How to test this fix ===

        First, enable the Locations window: Select "on" for "Locations" under the "User preferences" panel in the right sidebar. Then test the following scenarios:

        • Create a new draft. "Visibility after publishing" should give you the options of "Unchanged" or "Hidden". "Unchanged" should be default.
        • Store the draft with "Unchanged" as the selection. Note that the selection is kept.
        • Store the draft with "Hidden" as the selection. Note that the selection is kept.
        • Edit an existing object. The selection should always show as "Unchanged".
        Show
        Peter Keung added a comment - PR: https://github.com/ezsystems/ezpublish-legacy/pull/1266 === How to test this fix === First, enable the Locations window: Select "on" for "Locations" under the "User preferences" panel in the right sidebar. Then test the following scenarios: Create a new draft. "Visibility after publishing" should give you the options of "Unchanged" or "Hidden". "Unchanged" should be default. Store the draft with "Unchanged" as the selection. Note that the selection is kept. Store the draft with "Hidden" as the selection. Note that the selection is kept. Edit an existing object. The selection should always show as "Unchanged".

          People

          • Assignee:
            Unassigned
            Reporter:
            Peter Keung
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated: