🇮🇳India @ajay547

Account created on 31 July 2012, almost 12 years ago
#

Recent comments

🇮🇳India ajay547

Hi Team,

Do we have any document for safely updating mysql 5.7 to mysql 8.0 for Drupal 9.5 website.

Regards

🇮🇳India ajay547

Thanks for your reply VM.
any idea for any documentation which can atleast give me some basic steps to follow.

Currently I can find everywhere just to update local MYSQL and import our DB again and then test,
but this will be more of a trial and error.

Thanks in advance.

🇮🇳India ajay547

Hi Team,
any luck here.

For me the patches are being applied but the link/document not coming inline and everytime it is going to new line.

https://www.drupal.org/files/issues/entity_embed-inline-widgets-2640398-...

this worked and I was able to add link of document inline, but it broke the image embed functionality.

Any help on this is highly appreciated.

Thanks in Advance.

🇮🇳India ajay547

We are facing issue with the content type that has many paragraph values,
It is taking lot of time to save node, and DB spike goes upto 90%.

Please if anyone has any solution please let us know thanks in advance

🇮🇳India ajay547

Hi Cilefen,
Yes correct this issue is duplicate of this.

Team this issue is duplicate of
https://www.drupal.org/project/drupal/issues/3088239 🐛 Revisions on relations are not loaded correctly resulting in wrong data in includes Needs work
just some additional points to remember here

- Dont forget to update your Drupal core to atleast 9.3.0 in order to use this patch, because from 9.3.0 the core supposets revisions for paragraph and prior to that it supports only revision for node and media.
- You will need to handle view all revisions permission and view all media revisions.

🇮🇳India ajay547

Hi cilefen,

Thanks for your time and help, I found some help in this link.
https://www.drupal.org/project/drupal/issues/3088239 🐛 Revisions on relations are not loaded correctly resulting in wrong data in includes Needs work

Updating here as this could be helpfull for some one.

TIll Drupal 9.3 only revisions supported are file and node, after 9.3 update Drupal started support for paragraph revisions, so you need to bring your core above 9.3 and also you need to handle the permission (allow view revisions and allow view media revisions).

Thanks

🇮🇳India ajay547

I feel something is wrong in this piece of code

protected function resolveIncludeTree(array $include_tree, Data $data, Data $includes = NULL) {
$includes = is_null($includes) ? new IncludedData([]) : $includes;
foreach ($include_tree as $field_name => $children) {
$references = [];
foreach ($data as $resource_object) {
// Some objects in the collection may be LabelOnlyResourceObjects or
// EntityAccessDeniedHttpException objects.
assert($resource_object instanceof ResourceIdentifierInterface);
if ($resource_object instanceof LabelOnlyResourceObject) {
$message = "The current user is not allowed to view this relationship.";
$exception = new EntityAccessDeniedHttpException($resource_object->getEntity(), AccessResult::forbidden("The user only has authorization for the 'view label' operation."), '', $message, $field_name);
$includes = IncludedData::merge($includes, new IncludedData([$exception]));
continue;
}
elseif (!$resource_object instanceof ResourceObject) {
continue;
}
$public_field_name = $resource_object->getResourceType()->getPublicName($field_name);
// Not all entities in $entity_collection will be of the same bundle and
// may not have all of the same fields. Therefore, calling
// $resource_object->get($a_missing_field_name) will result in an
// exception.
if (!$resource_object->hasField($public_field_name)) {
continue;
}
$field_list = $resource_object->getField($public_field_name);
// Config entities don't have real fields and can't have relationships.
if (!$field_list instanceof FieldItemListInterface) {
continue;
}
$field_access = $field_list->access('view', NULL, TRUE);
if (!$field_access->isAllowed()) {
$message = 'The current user is not allowed to view this relationship.';
$exception = new EntityAccessDeniedHttpException($field_list->getEntity(), $field_access, '', $message, $public_field_name);
$includes = IncludedData::merge($includes, new IncludedData([$exception]));
continue;
}
$target_type = $field_list->getFieldDefinition()->getFieldStorageDefinition()->getSetting('target_type');
assert(!empty($target_type));
foreach ($field_list as $field_item) {
assert($field_item instanceof EntityReferenceItem);
$references[$target_type][] = $field_item->get($field_item::mainPropertyName())->getValue();
}
}
foreach ($references as $target_type => $ids) {
$entity_storage = $this->entityTypeManager->getStorage($target_type);
$targeted_entities = $entity_storage->loadMultiple(array_unique($ids));
$access_checked_entities = array_map(function (EntityInterface $entity) {

return $this->entityAccessChecker->getAccessCheckedResourceObject($entity);
}, $targeted_entities);
$targeted_collection = new IncludedData(array_filter($access_checked_entities, function (ResourceIdentifierInterface $resource_object) {
return !$resource_object->getResourceType()->isInternal();
}));
$includes = static::resolveIncludeTree($children, $targeted_collection, IncludedData::merge($includes, $targeted_collection));
}
}
return $includes;
}

Here I am not able use $entity_storage->loadMultiple(array_unique($ids)) along with translation.

just for reference this is code from this file
web/core/modules/jsonapi/src/IncludeResolver.php

🇮🇳India ajay547

Hi cilefen,

Sure here is the summary for my issue.
I have a content type basic_page. It has one field of paragraph say A. Now one field of paragraph lets say field_B is again referencing to various paragraphs fields. Now If I am creating a node and in field_A selecting a paragraph field lets say field_C which has further paragraph reference in one of its field, then it is giving me translation issue.
This is happening only if I select field_B, for creaing my node, in case I am not referencing field B and referencing some other fields, then it is working fine. Now I am using JSONAPI to pull reference for the paragraph fields value through include parameter in JSONAPI.

Thanks in Adavance.

🇮🇳India ajay547

Hi @cilefen & larowlan

I have update my site to Drupal core 9.5.7
still I am facing the translation issue.
The nested paragraphs are allways loading in default language (en) and this is breaking my site's translation.
Any input or workaround here will be highly appreciated I am blocked on this.

Thanks in Advance

Production build 0.69.0 2024