- Status changed to Fixed
over 1 year ago 11:22am 18 January 2023 Automatically closed - issue fixed for 2 weeks with no activity.
Error: Call to undefined method Drupal\Core\Field\InternalViolation::getConstraint() in Drupal\entityqueue\Plugin\Field\FieldWidget\EntityqueueDragtableWidget->errorElement() (line 167 of /<redacted>/web/modules/contrib/entityqueue/src/Plugin/Field/FieldWidget/EntityqueueDragtableWidget.php)
The error is triggered when trying to edit/save an entity queue that was previously filled by an admin, but is now being edited by a user with less privileges. This is the error that should display if the code didn't fail:
This entity (%type: %id) cannot be referenced.
The class that causes the code to fail is Drupal\Core\Field\InternalViolation
, which was introduced in Drupal 9.5.0-beta1, so you should use at least that version to test.
The new Drupal\Core\Field\InternalViolation
class doesn't have a way to get the constraint, so I suggest checking the message template instead. The getMessageTemplate
method is part of ConstraintViolationInterface
, while the getConstraint
method isn't.
Fixed
1.0
Code
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
Automatically closed - issue fixed for 2 weeks with no activity.