Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Not sure if this error was reported before.
I was wondering if CM ever worked for any simple case where non-admin user moved content from Draft to In Review.
Notice: Trying to get property of non-object in Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator->isFirstTimeModeration() (line 129 of core/modules/content_moderation/src/Plugin/Validation/Constraint/ModerationStateConstraintValidator.php).
Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator->isFirstTimeModeration(Object) (Line: 87)
Drupal\content_moderation\Plugin\Validation\Constraint\ModerationStateConstraintValidator->validate(Object, Object) (Line: 185)
...
The website encountered an unexpected error. Please try again later.
Error: Call to a member function isRevisionTranslationAffected() on null in Drupal\content_moderation\ParamConverter\EntityRevisionConverter->convert() (line 101 of core/modules/content_moderation/src/ParamConverter/EntityRevisionConverter.php).
Drupal\content_moderation\ParamConverter\EntityRevisionConverter->convert('3', Array, 'node', Array) (Line: 99)
Drupal\Core\ParamConverter\ParamConverterManager->convert(Array) (Line: 89)
...
Comment | File | Size | Author |
---|---|---|---|
#6 | 2817305.patch | 797 bytes | pericxc |
Comments
Comment #2
pericxc CreditAttribution: pericxc commentedComment #3
Sam152 CreditAttribution: Sam152 commentedCan you please provide detailed steps on how to reproduce this?
Comment #4
pericxc CreditAttribution: pericxc commentedComment #5
pericxc CreditAttribution: pericxc commentedAlso, CM doesn't have any test case for multi-user use case (second error).
This solution works for me.
Would like to see if anyone else tested it and if there is any other solution.
Comment #6
pericxc CreditAttribution: pericxc commentedComment #7
pericxc CreditAttribution: pericxc commented@Sam152, since there are no tests for those kind of use cases. For example, second user has only one permission - "Keep in Draft". I guess it has to be manually tested. Would you please verify?
Comment #8
Sam152 CreditAttribution: Sam152 commentedI have been using content moderation with a mixture of different permissions on roles. There is no reason we can't create two users with different permissions in a test to verify and test this functionality.
Comment #9
Sam152 CreditAttribution: Sam152 commentedComment #13
timmillwoodThis was fixed as part of #2932154: ModerationInformation::getLatestRevisionId returns access-specific results