Problem/Motivation

Once we complete #3497728: HostIsOpen constraint should add cache expiry metadata and #3505948: Add a new HostEntity method isOpenForRegistration we will have properly functioning access for register links and forms.
At this point there's no obvious need for the set_and_forget setting.

Probably we should remove it, to reduce complexity. This would have the desirable effect of clarify the semantic of 'status': its something manually set by the admin that overrides other settings, not just an implementation mechanism for the close setting.

Steps to reproduce

Proposed resolution

Remaining tasks

User interface changes

API changes

Data model changes

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

jonathanshaw created an issue. See original summary.

jonathanshaw’s picture

Status: Active » Postponed
jonathanshaw’s picture

Status: Postponed » Active
john.oltman’s picture

Status: Active » Closed (works as designed)
john.oltman’s picture

john.oltman’s picture

Status: Closed (works as designed) » Postponed

I believe we are going to end up keeping "set and forget", but I've changed the status from Closed to Postponed, in light of my reopening of the cache expiry issue. Please note that "set and forget" is also used to initially open registration, not just disable on close.

jonathanshaw’s picture

I get the idea of a setting that controls whether or not register links/tabs still show even when they are no longer truly registerable.

The "keep showing a register link but take people a page that lists reasons why they can't" approach is not a bad idea, although for many sites registering is such an important call-to-action that relying on a tab for it makes no sense and something like RegistrationLinkFormatter is a better approach, in which case #3499231: Show causes with registration link and form opens up a better solution to informing people about why they can't register.

Nonetheless, I can see a case for keeping a setting here. What I'm less sure about is keeping the mechanic that powers the existing setting. But (ab)using the status setting to handle this scenario, we make it harder to know what is means when a host is disabled as we found in #3497732: Simplify the status validation check.

It is now technically possible for us to stop relying on the cron/status mechanism and instead use HostEntity::isAvailableForRegistration() in the register route access check, but only if a setting like set_and_forget is enabled. This mechanism would have the advantage of also removing the register link if the host was full or you had already registered, which is probably what someone also wants if they want to hide register when an host is closed or not yet open.

BC is a headache here. One solution would be to add a new setting and deprecate the old setting with a hook_requirements() block that prevented upgrading if the old setting was enabled.

john.oltman’s picture

Status: Postponed » Closed (works as designed)

Set and forget is going to be around for quite some time, and possibly always. We can reopen if a new rationale presents itself. The original rationale is no longer present since isAvailableForRegistration cannot be called from the access check for performance reasons.

john.oltman’s picture

Title: The set_and_forget setting is no longer needed » The set_and_forget setting may no longer be needed
Issue summary: View changes
Status: Closed (works as designed) » Active
john.oltman’s picture

Reopened per #3505948: Add a new HostEntity method isOpenForRegistration.

We'll see if we can get rid of it. If yes, then this statement of mine didn't age well, LOL.

Set and forget is going to be around for quite some time, and possibly always.

john.oltman’s picture

Assigned: Unassigned » john.oltman

john.oltman changed the visibility of the branch 3497731-remove-setandforget to hidden.

john.oltman’s picture

Title: The set_and_forget setting may no longer be needed » Deprecate the "set and forget" feature

john.oltman’s picture

Assigned: john.oltman » Unassigned
Status: Active » Fixed

The code to remove the feature entirely is in a hidden branch, but I realized after starting it that it needs to be deprecated first. So in registration:4.0.0 we can use that code.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.