-
Notifications
You must be signed in to change notification settings - Fork 1
Events that have a new draft or review revision no longer show even if still published #143
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
Comments
Discovery on this $isInsert = $event->isInsert();
if (!$isInsert) {
// Delete all existing values for entity and field combination.
/** @var string|int $entityId */
$entityId = $list->getEntity()->id();
$this->database->delete($tableName)
->condition('entity_id', (string) $entityId)
->execute();
} if ($entity->getEntityType()->isRevisionable() && $entity instanceof RevisionableInterface) {
$fields[] = 'revision_id';
$baseRow['revision_id'] = $entity->getRevisionId();
} So what is happening is that every time an event is saved, the date occurances table for that node gets deleted, and new calculated dates added, but only for the current saved revision, which might not be a published one, and that is breaking the query in views. However it is a service / event subscriber, so maybe there is a way to override this without patching. date_recur.occurrences:
class: Drupal\date_recur\DateRecurOccurrences
arguments: ['@database', '@entity_field.manager', '@typed_data_manager', '@entity_type.manager']
tags:
- { name: 'event_subscriber' } |
Sounds like a bug upstream to me. Wouldn't you want the published version (if there is) to be the one that you calculate the views values for? At least by default. |
Very old patch here https://www.drupal.org/project/date_recur/issues/3010184#comment-13156851 |
BHCC has applied this patch, might be worth including here in case it comes up for others. |
Fix #143 Adds the patch from https://www.drupal.org/project/date_recur/issues/3010184#comment-13156851 (comment 6). This allows events that have been published to be moved to draft or review and still show on the events calendar, as the default (published) revision will retian it's calculated dates used by views.
Fix #143 Adds the patch from https://www.drupal.org/project/date_recur/issues/3010184#comment-13156851 (comment 6). This allows events that have been published to be moved to draft or review and still show on the events calendar, as the default (published) revision will retian it's calculated dates used by views.
When creating a new revision of an event, or an event has a scheduled transition to review, it falls off the event listing.
Steps to reproduce
Note that the event, even though still having a published revision, is no longer on the events view.
I did quite a lot of digging on this one, I found that the DB table
date_recur__node__localgov_event_date
contains both anentity_id
andrevision_id
. However the revision_id is always the latest revision, not the default revision.Looking at the events views SQL query, there is a join to revision
Views query below, which includes BHCC fields.
The text was updated successfully, but these errors were encountered: