- 🇧🇪Belgium dieterholvoet Brussels
This error is triggered if the amount of ids which is passed to the backend doesn't match the amount of loaded entities:
// Load all entities in $current_order. $entities = $this->entityManager->getStorage($base_entity_type->id())->loadMultiple(array_values($current_order)); if (count($entities) != count($current_order)) { return AccessResult::forbidden()->setReason('Not all entities appear to belong to the same entity type.')->setCacheMaxAge(0); }
This could happen if the passed entity ID's are from multiple entity types, which would mean that part of the entity ID's doesn't correspond to an actual entity. This isn't possible in views though, so maybe the best solution would be to remove that check.
This can also happen if an entity listed in the view has been deleted in the meantime. In that case, I think we should just silently skip that ID. Another use case supporting the removal of this check.
I had the same issue with nodes with translations. I created the view to filter to the default language (English) and the error went away and the weights were saved.
This error can also happen if your view lists the same entity multiple times, in multiple languages, since only the ID is sent to the backend. Ideally that would be an ID/langcode combination. I suggest we fix that in ✨ Save translated version of entity, if one exists Needs work .
i have the same issue, but the view already has a filter to the default language set.
Do you have any idea why the same entity would be listed more than once in your view? Maybe this was a case where an entity was deleted and the view was saved without reloading the page?