Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix EZP-26501: In-edit Locations window (legacy) should not force "Visible" flag #1266

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

peterkeung
Copy link
Contributor

@peterkeung peterkeung commented Oct 25, 2016

JIRA issue ticket: https://jira.ez.no/browse/EZP-26501

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:

c3e8ff5

However, that commit caused the following:

  • "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"

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.

=== 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".

@peterkeung
Copy link
Contributor Author

Ping @pspanja @benkmugo for review

@benkmugo
Copy link
Contributor

Nothing to add to the description from my end; all the details are there.
The main points are the last two under 'Given that', which explain the issue the commit introduced.

I'm currently working around the issue with an override template, but it would be good to have this fixed in the core.

+1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants