@adam-vessey entity type check is ok, but I think we need to check also bundle if exist, because we are linking bundles to the groups, not just entity types.
My investigation sent me to this issue. We are expecting the same problem with our very large site. The patch is doing it job, but I don't understand why we are altering query for entities which are not related with groups at all?
Reroll patch from #52 for Drupal 10.3.1
Reroll patch from #52 for Drupal 10.2.5
On Ckeditor 5 when you are trying to paste image from Microsoft Office Word (Windows), it returns base64 object. It uploads image just when you are adding image element and enable "upload image". But what to do when you don't want image element to be uploaded to your files folder.
For sure this module logic is necessary on CKeditor!
Fix missed used statements. Drupal 10.1.7
Reroll patch for drupal 10.1.7
Reroll patch for drupal 10.1.7.
@smustgrave value is empty because code tries to get value which is not already found in form after it items list was ajaxfy refreshed.
I don't see the reason to create test for this because by default is clear if you are getting NULL or empty results it means that no item was selected. We just need to provide default value instead NULL to pass array_filter condition.
Updated patch:
Sorry for confusion, I fished this error from graylog where we are putting ours logs.
After some research I find the way to reproduce it.
So $selected = array_filter($form_state->getValue($this->options['id'], []));
should fix it.
Hi @shiv_yadav, the drupal 10 version is already merged in dev. It is waiting for release.
https://www.drupal.org/project/private_message/issues/3297888
📌
Automated Drupal 10 compatibility fixes
Needs review
Agree with @tgoeg. Can we have it release cause other security tools give it like security issue beeng dowloaded from dev branch.
Hi @artem_sylchuk, as you know Drupal 9 is close to end. When you think we will have the next release including this issue?
Thank you!
Update for broken patch:
Core 9.5.11
I know Drupal 9 is close to the end. But for last months maybe it is necessary for someone:
Drupal 9.5.11 patch.
gisle → credited ion.macaria → .
Guys patch is fine, but it missed something. When node view is not for all users it appears that error on translation:
Drupal\Core\Entity\EntityStorageException: SQLSTATE[23000]: Integrity constraint violation: 1062 Duplicate entry '689868-7-content_access_roles-es' for key 'node_access.PRIMARY': INSERT INTO "node_access"
To fix it content_access_get_type_grant function "$defaults" static variable should take in consideration node language. So this function should looks like:
/**
* Returns the default grants for a given node type.
*/
function content_access_get_type_grant(NodeInterface $node) {
// Cache per type default grants in a static array.
static $defaults = [];
$node_type = $node->getType();
if (!isset($defaults[$node_type][$node->language()->getId()])) {
$grants = [];
// Only process the 'view' op as node_access() will take care of
// edit and delete.
foreach (content_access_get_settings('view', $node_type) as $rid) {
$gid = content_access_get_role_gid($rid);
$grant['grant_view'] = 1;
$grants[] = content_access_proccess_grant($grant, $gid, $node);
}
$defaults[$node_type][$node->language()->getId()] = $grants;
}
// Care for the author grant.
$grant = $grants = [];
$settings = [
'view' => content_access_get_settings('view', $node_type),
'view_own' => content_access_get_settings('view_own', $node_type),
];
$grant['grant_view'] = content_access_own_op($node, $settings['view'], $settings['view_own']);
if ($grant['grant_view']) {
$grant['realm'] = 'content_access_author';
$grants = [
'author' => content_access_proccess_grant($grant, $node->getOwnerId(), $node),
];
}
return $defaults[$node_type][$node->language()->getId()] + $grants;
}
Tested patch on Drupal 9.5.x and Drupal 10.1.x
ion.macaria → created an issue.