-
Notifications
You must be signed in to change notification settings - Fork 2
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
Harden content drafts and force-disable drafts when coupled with workbench_moderation
#192
Conversation
I'll test this as well. |
I haven't tested fully yet, but here's a scenario that still needs work:
We need to add |
I can add the |
Managed to completely bork my test 9.5 site by installing/uninstalling workbench moderation... now content isn't syncing at all :/ I think due to having content moderation enabled first... |
Actually, it seems to be when |
$disable_drafts = $config->get('disable_content_drafts'); | ||
if (!$disable_drafts) { | ||
$headers['quant-token'] = \Drupal::service('quant.token_manager')->create($route); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
With the if (!$disable_drafts) {
logic in place, I can't get published content to sync at all when Disable content drafts
is enabled. I tested this with both Workbench Moderation and Content Moderation modules uninstalled.
When I removed the check in both places, then it worked as expected.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Latest commit 2bca4a7 will resolve by disabling token verification when drafts are disabled -- glad you picked that up!
…al into feat/harden-internal-token
The new changes work fine when no moderation modules are enabled. I tested with the following and quant always looked correct. I still need to test with the two moderation modules. setting unchecked
setting unchecked
setting checked
setting checked
|
I've tested carefully with the latest code with:
Note there is nothing preventing both from being installed at the same time, but there will be strange behavior and errors. I went between draft and published in various orders for #1. I went between draft, published, and archived in various orders for #2. I went between draft, review, published, and archived in various orders for #3. Everything worked as expected. Quant published state was always the correct value. |
Oh, there are some linting errors I can fix. |
I'll get this merged and up to d.o repo. |
workbench_moderation
is not currently supported and has issues when the "disable drafts" option is not enableddisable_content_drafts
to onquant-token
header when content drafts are disabled