Problem/Motivation

Date entities that are themselves published but are related to an unpublished event entity should be excluded from date overviews.
This is especially important for entities imported from third party sources (Reservix etc) that you want to hide on your site; editors will have a hard time unpublishing every single date entity, possibly every day.

It would be much easier to just unpublish the parent event instead.

Proposed resolution

Update the related_date and oc_map_dates views to add a filter on the event's status.

Comments

mrshowerman created an issue. See original summary.

mrshowerman’s picture

Assigned: mrshowerman » Unassigned
Status: Active » Needs review
StatusFileSize
new7.13 KB

See attached patch.

hexabinaer’s picture

Looking into it, the approach makes sense for the related_date view.

However, I doubt it will work for oc_map_dates because as far as I remember this filter would not be reflected in the module's code. Have you really successfully tested that filter in an "OC Map"?

hexabinaer’s picture

Upon second thought, I might make sense to change the publishing workflow for dates then (default published). As a second step.

mrshowerman’s picture

Have you really successfully tested that filter in an "OC Map"?

As far as I know, yes. Otherwise the map on https://beta.kultino.de/node/9 would show dozens of "Jever Brauereiführung" dates.

moritz.steinhauer’s picture

We should keep one thing in mind: dates and events might belong to different users. If an ensemble unpublishes an event, all dates (that might be published by locations that host an event) will no longer be visible. But this seems like an edge case to me.

What might be more problematic: often users with the role oc-organiser forget to publish events and only publish their dates. At the moment, this is not a big problem because the text of the event is still rendered in the date, even if the event is unpublished. If we apply mrshowermans patch, we should also change the publishing-workflow for events. Otherwise there will be much more supports-requests caused by "missing dates" in the calendar :-D

hexabinaer’s picture

Good point @moritz.steinhauer. This might be very dependent from how calendar content is created and how site owners set the rules.

It makes sense when events + corresponding dates are imported and published by default. However, we can have different scenarios.

Maybe a more generic solution would rather be found with an optional ECA function and let site-owners decide to unpublish or even delete dates related to the event in question?

hexabinaer’s picture

Oops, so sorry. #3 was related to a different issue :-}

tobiasb’s picture

Version: 2.2.x-dev » 3.0.x-dev
Category: Feature request » Bug report
Parent issue: » #3582467: Release plan 3.0.0 with D11 support