Active
Project:
Conflict
Version:
8.x-2.0-alpha1
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Unassigned
Reporter:
Created:
7 Feb 2020 at 22:12 UTC
Updated:
15 Apr 2021 at 19:38 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
hchonovUnfortunately the module currently does not automatically support forward revisions - something that content moderation relies on. We would the attention of someone knowing more of the interns of content moderation in order to make it work with conflict automatically.
Comment #3
joseph.olstadyes I noticed this as well, for now we are uninstalling the conflict module. Our workflow has way more transitions than this and moderation states. I don't have the time right now to investigate.
Comment #4
bsfajardo commentedI think I found a fix for this. Per my investigation, the issue was in the
hook_form_alter()implementation.In this hook, the content entity extracted from the form object
$form_object->getEntity()was not fully loaded with revision information, for some reason that is still not clear to me. In theconflict_prepare_entity_form()helper method, trying to execute$entity->isDefaultRevision()was always returningFALSE, causing the conflict support flag for the form to be disabled:$form_state->set('conflict.supported', FALSE).My suggestion is to use the hook
hook_entity_prepare_form()to update the conflict support flag based on the fully loaded entity object, and then lethook_form_alter()be called to apply the necessary updates in the form.Patch is attached. Tested on Drupal 9.1.5 and Conflict 8.x-2.0-alpha2.