- đłđżNew Zealand quietone
There is no indication on what this is postponed on. Using
git log -S
with varying strings from the issue summary, I was not able to find that code in core. Therefore, closing as outdated.
The code in \Drupal\content_moderation\EntityOperations::entityStorageLoad
(below) is very iterative and should be reworked into a more functional solution.
/**
* Hook bridge.
*
* @see hook_entity_storage_load().
*
* @param EntityInterface[] $entities
* An array of entity objects that have just been loaded.
* @param string $entity_type_id
* The type of entity being loaded, such as "node" or "user".
*/
public function entityStorageLoad(array $entities, $entity_type_id) {
// Ensure that all moderatable entities always have a moderation_state field
// with data, in all translations. That avoids us needing to have a thousand
// NULL checks elsewhere in the code.
// Quickly exclude any non-moderatable entities.
$to_check = array_filter($entities, [$this->moderationInfo, 'isModeratableEntity']);
if (!$to_check) {
return;
}
// @todo make this more functional, less iterative.
foreach ($to_check as $entity) {
foreach ($entity->getTranslationLanguages() as $language) {
$translation = $entity->getTranslation($language->getId());
if ($translation->moderation_state->target_id == NULL) {
$translation->moderation_state->target_id = $this->getDefaultLoadStateId($translation);
}
}
}
}
Closed: outdated
11.0 đĽ
other
Not all content is available!
It's likely this issue predates Contrib.social: some issue and comment data are missing.
There is no indication on what this is postponed on. Using git log -S
with varying strings from the issue summary, I was not able to find that code in core. Therefore, closing as outdated.