Upload loze's patch from #99 in order to use it with composer patches.
A few interesting notes:
- This issue only seems to appear in Chrome based browsers (e.g. Edge), but not Firefox
- For us it only appears in the media library grid widget, and only after entering a term in the search box
- It affects both items not being able to be selected, but also when selecting any item a wrong item can be selected
- As suggested in #22 and #23, disabling the cache on the media library widget view (/admin/structure/views/view/media_library/edit/widget), seems to resolve the issue (we've only disabled it on the grid widget, not the other displays)
As a workaround you can hide it with this CSS snippet:
/* Hide text format help text */
.page-content .filter-wrapper {
display: none;
}
I don't think adding arbitrary text to the paragraphs module is the way to go here. But having the ID or even the UUID available makes very much sense. I've added a small patch that exposes both the ID as well as the UUID to the paragraph widget. This allows you to access both and change the summary as you see fit, for example:
function mymodule_field_widget_single_element_paragraphs_form_alter(array &$element, \Drupal\Core\Form\FormStateInterface $form_state, array $context) {
if (!empty($element['#paragraph_id']))) {
$element['top']['type']['label']['#markup'] .= " <span>(#{$element['#paragraph_id']})</span>";
}
}
Please note that when adding a new paragraph to a node, it will have a UUID, but not a ID. The ID will only be created once you save the node and attach the paragraph to it.
dgsiegel → created an issue.
dgsiegel → created an issue.
dgsiegel → created an issue.
When you create a node and put it into a menu via the sidebar, the title
will be null
. When you create or update a menu entry via admin/structure/menu
, the title
will be ""
. As we're not using any options,
https://www.drupal.org/project/jsonapi_extras/issues/3232279#comment-146...
🐛
Invalid output JSON schema in UrlLinkEnhancer
Fixed
works for us.
Unfortunately using background-color: var(--gin-color-danger) !important;
will break the hover state, like in the attached screenshot.
As this patch didn't work for us in Drupal 10.x, we've decided to handle this in a custom module. We're appending a custom callback in the widget hook for image_image
and setting the default value of the alt tag there:
<?php
/**
* Implements hook_field_widget_single_element_WIDGET_TYPE_form_alter() for image_image
*/
function mymodule_field_widget_single_element_image_image_form_alter(array &$element, \Drupal\Core\Form\FormStateInterface $form_state, array $context) {
$element['#process'][] = "mymodule_image_widget_process";
}
/**
* Prefill alt tags in image widget on upload
*/
function mymodule_image_widget_process($element, \Drupal\Core\Form\FormStateInterface $form_state, $form) {
if (!empty($element['#files']) && $element['#preview_image_style']) {
if (empty($element['alt']['#default_value'])) {
$file = reset($element['#files']);
$filename = pathinfo($file->getFileName(), PATHINFO_FILENAME);
$clean = str_replace(array('-', '_'), ' ', $filename);
$element['alt']['#default_value'] = $clean;
}
}
return $element;
}
Hope this helps!
As we needed this patch for our composer setup and couldn't trust Gitlab to always deliver the same file, I've reuploaded @jkswoods → 's patch. All credit belongs to him.
The same thing happens with the scheduler module enabled. Unfortunately, it's not enough to move those fields into the sidebar, as the scheduler module adds more changes to the form than just the fields. Not using `quick_node_clone` would be an easy fix...
Patch #55 does not seem to work with a headless approach. Metatags will be saved in the computed field. In a normal approach, where Drupal is rendering the output, the patch overwrites empty tags with global defaults:
// Merge with global defaults.
if (strpos($route_name, 'canonical') !== FALSE) {
$metatags->overwriteTags(metatag_filter_empty_tokens($entity_metatags->get('tags'), $entity));
}
However when saving to the computed field, the route is not canonical
and so global defaults are left untouched. When accessing JSON:API, only the computed field gets accessed and no merge can happen at that time.
dgsiegel → created an issue.
dgsiegel → created an issue.
As we needed this patch for our composer setup and couldn't trust Gitlab to always deliver the same file, I've reuploaded @acbramley's patch. All credit belongs to him.
dgsiegel → created an issue.
dgsiegel → created an issue.
Thanks, just updated the status.
dgsiegel → created an issue.
dgsiegel → created an issue.