bhuvaneshwar โ changed the visibility of the branch 3478965-remove-media-button to hidden.
Hi @lauriii, just to confirm, we cannot drag the column_one component into its child components like images or text. However, we are able to drag the main two-column parent component under column_one. Can the same structure be applied to the main parent component?
I was able to reproduce the issue and have started making progress on it.
getting an error when dragging component into itself
bhuvaneshwar โ made their first commit to this issueโs fork.
wim leers โ credited bhuvaneshwar โ .
bhuvaneshwar โ created an issue.
Unassigned it for now as per the priority of the issue @soaratul you can pick this.
Sure @thejimbirch I am unassigned this for now, Thanks.
I discovered that the PDF module was for version 10.x and not compatible with 11.x, so I updated the module to work with version 11.x. I'll now proceed with the steps provided.
Agree with #5 in order to omit duplicate blocks while initializing themes we can use:
// Get the list of themes installed and blocks to assign.
$themes = system_list('theme_enabled');
foreach ($themes as $theme => $info) {
// Get the default blocks for the theme.
$blocks = theme_get_default_blocks($theme);
// Filter out duplicates.
$unique_blocks = array_unique($blocks, SORT_REGULAR);
// Assign the unique blocks to their regions.
foreach ($unique_blocks as $block) {
// Assign the block to the region.
block_place_block($block);
}
}
As I'm also facing the same issue in this case with GIn theme but, I don't have a gin: * in my recipe too
Test needs to be added
Here is the stack trace:
TypeError: str_starts_with(): Argument #1 ($haystack) must be of type string, null given in str_starts_with() (line 140 of /var/www/html/modules/experience_builder/src/FieldTypeUninstallValidator.php).
#0 /var/www/html/modules/experience_builder/src/FieldTypeUninstallValidator.php(140): str_starts_with()
#1 /var/www/html/modules/experience_builder/src/FieldTypeUninstallValidator.php(56): Drupal\experience_builder\FieldTypeUninstallValidator->checkDefaultValueUses()
#2 /var/www/html/core/lib/Drupal/Core/Extension/ModuleInstaller.php(645): Drupal\experience_builder\FieldTypeUninstallValidator->validate()
#3 /var/www/html/core/lib/Drupal/Core/ProxyClass/Extension/ModuleInstaller.php(99): Drupal\Core\Extension\ModuleInstaller->validateUninstall()
#4 /var/www/html/core/modules/system/src/Form/ModulesUninstallForm.php(161): Drupal\Core\ProxyClass\Extension\ModuleInstaller->validateUninstall()
#5 [internal function]: Drupal\system\Form\ModulesUninstallForm->buildForm()
#6 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(536): call_user_func_array()
#7 /var/www/html/core/lib/Drupal/Core/Form/FormBuilder.php(284): Drupal\Core\Form\FormBuilder->retrieveForm()
#8 /var/www/html/core/lib/Drupal/Core/Controller/FormController.php(73): Drupal\Core\Form\FormBuilder->buildForm()
#9 [internal function]: Drupal\Core\Controller\FormController->getContentResult()
#10 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(123): call_user_func_array()
#11 /var/www/html/core/lib/Drupal/Core/Render/Renderer.php(638): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#12 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(121): Drupal\Core\Render\Renderer->executeInRenderContext()
#13 /var/www/html/core/lib/Drupal/Core/EventSubscriber/EarlyRenderingControllerWrapperSubscriber.php(97): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext()
#14 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(181): Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->Drupal\Core\EventSubscriber\{closure}()
#15 /var/www/html/vendor/symfony/http-kernel/HttpKernel.php(76): Symfony\Component\HttpKernel\HttpKernel->handleRaw()
#16 /var/www/html/core/lib/Drupal/Core/StackMiddleware/Session.php(53): Symfony\Component\HttpKernel\HttpKernel->handle()
#17 /var/www/html/core/lib/Drupal/Core/StackMiddleware/KernelPreHandle.php(48): Drupal\Core\StackMiddleware\Session->handle()
#18 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ContentLength.php(28): Drupal\Core\StackMiddleware\KernelPreHandle->handle()
#19 /var/www/html/core/modules/big_pipe/src/StackMiddleware/ContentLength.php(32): Drupal\Core\StackMiddleware\ContentLength->handle()
#20 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(106): Drupal\big_pipe\StackMiddleware\ContentLength->handle()
#21 /var/www/html/core/modules/page_cache/src/StackMiddleware/PageCache.php(85): Drupal\page_cache\StackMiddleware\PageCache->pass()
#22 /var/www/html/core/lib/Drupal/Core/StackMiddleware/ReverseProxyMiddleware.php(48): Drupal\page_cache\StackMiddleware\PageCache->handle()
#23 /var/www/html/core/lib/Drupal/Core/StackMiddleware/NegotiationMiddleware.php(51): Drupal\Core\StackMiddleware\ReverseProxyMiddleware->handle()
#24 /var/www/html/core/lib/Drupal/Core/StackMiddleware/AjaxPageState.php(36): Drupal\Core\StackMiddleware\NegotiationMiddleware->handle()
#25 /var/www/html/core/lib/Drupal/Core/StackMiddleware/StackedHttpKernel.php(51): Drupal\Core\StackMiddleware\AjaxPageState->handle()
#26 /var/www/html/core/lib/Drupal/Core/DrupalKernel.php(736): Drupal\Core\StackMiddleware\StackedHttpKernel->handle()
#27 /var/www/html/index.php(19): Drupal\Core\DrupalKernel->handle()
#28 {main}
So, when I try to uninstall XB, I encounter this error or by going to the uninstall page.
Bhuvaneshwar โ created an issue.
@catch, I'm experiencing some permission issues with git access. However, based on my findings, I suggest the following approach:
In the widget, we can define the class as:
class ExpressionFieldWidget extends WidgetBase {
/**
* {@inheritdoc}
*/
public function formElement(FieldItemListInterface $items, $delta, array $element, array &$form, FormStateInterface $form_state) {
$element['value'] = [
'#type' => 'textfield',
'#title' => $this->t('Expression'),
'#default_value' => isset($items[$delta]->value) ? $items[$delta]->value : NULL,
];
return $element;
}
}
Then, we can define the field storage:
function experience_builder_install() {
// Define the field storage for the expression field.
\Drupal::service('entity_type.manager')->getStorage('field_storage_config')->create([
'field_name' => 'field_expressions',
'entity_type' => 'node',
'type' => 'expression_field',
'cardinality' => FieldStorageDefinitionInterface::CARDINALITY_UNLIMITED,
])->save();
}
For querying the new field, we can use:
$query = \Drupal::database()->select('node__field_expressions', 'e')
->fields('e', ['entity_id'])
->condition('e.value', '%' . $field_expression . '%', 'LIKE');
$result = $query->execute();
By transitioning to a standard Field API field that accepts multiple values, we can avoid database-specific JSON manipulation issues and ensure the code is compatible across different database systems.
Please let me know your thoughts. Once I get the access issue resolved, I will apply these changes if everything looks good to you.
@tedbow, I looked for some workaround for issue #8 with the prefixTables function. Can we override Drupal's prefixTables method to handle JSON paths correctly?
public function prefixTables($sql) {
// Custom method to handle JSON paths
$sql = $this->handleJsonPaths($sql);
// Let Drupal handle its own prefixing
return \Drupal::database()->prefixTables($sql);
}
private function handleJsonPaths($sql) {
// Protect JSON paths from being altered by prefixTables
return preg_replace_callback('/->\'{[^}]+}\'/', function($matches) {
return str_replace(['{', '}'], ['__JSON_START__', '__JSON_END__'], $matches[0]);
}, $sql);
}
However, I'm not sure where to test or run this. Can you help me with how to reproduce this?
The same problems with Drupal 10.1.4 on a custom form, Block's /WYSIWYG field, And the patch is not working either after saving the entity.
When I use the code as per this article is it working fine https://drupal8.ovh/en/tutoriels/437/ckeditor-inline-image-files-usage-c....