Drupal 10: copy web/modules/contrib/recaptcha/templates/recaptcha-widget-noscript.html.twig to your theme and replace the content with:
{#
/**
* @file recaptcha-widget-noscript.tpl.php
* Default theme implementation to present the reCAPTCHA noscript code.
*
* Available variables:
* - sitekey: Google web service site key.
* - language: Current site language code.
* - url: Google web service API url.
*
* @see template_preprocess()
* @see template_preprocess_recaptcha_widget_noscript()
*
* @ingroup themeable
*
* Accessibility issue https://www.drupal.org/project/recaptcha/issues/2213337
*/
#}
<noscript>
<div style="width: 302px; height: 352px;">
<div style="width: 302px; height: 352px; position: relative;">
<div style="width: 302px; height: 352px; position: absolute;">
<iframe src="{{ url }}" title="Google captcha" style="border: none; overflow: hidden; width: 302px; height:352px; border-style: none;"></iframe>
</div>
<div style="width: 250px; height: 80px; position: absolute; border-style: none; bottom: 21px; left: 25px; margin: 0px; padding: 0px; right: 25px;">
<label class="visually-hidden" for="g-recaptcha-response">Recaptcha response</label>
<textarea id="g-recaptcha-response" name="g-recaptcha-response" class="g-recaptcha-response" style="width: 250px; height: 80px; border: 1px solid #c1c1c1; margin: 0px; padding: 0px; resize: none;" value="" aria-hidden="true"></textarea>
</div>
</div>
</div>
</noscript>
Workaround with javascript:
Drupal.behaviors.colorboxAccessibility = {
attach: function (context, settings) {
// Attach after Colorbox is loaded and opened
$(document).on('cbox_open', function () {
// Add ARIA labels to Colorbox buttons
$('#cboxPrevious').attr('aria-label', Drupal.t('Previous'));
$('#cboxNext').attr('aria-label', Drupal.t('Next'));
$('#cboxSlideshow').attr('aria-label', Drupal.t('Start slideshow'));
$('#cboxClose').attr('aria-label', Drupal.t('Close'));
});
}
};
Some changes for #13 to make it work in Drupal 10: Plugin folder should be capitalized, Url.php also with capitals and namespace is needed. See zip attached with the full module, just enable, rollback the failing migration and reimport.
namespace Drupal\custom_url_migrate\Plugin\migrate\field;
use Drupal\migrate\Plugin\MigrationInterface;
use Drupal\migrate_drupal\Plugin\migrate\field\FieldPluginBase;
/**
* Defines a URL field migration plugin.
*
* @MigrateField(
* id = "url",
* core = {7},
* type_map = {
* "url" = "link"
* },
* source_module = "url",
* destination_module = "link"
* )
*/
class Url extends FieldPluginBase {
/**
* {@inheritdoc}
*/
public function getFieldWidgetMap() {
return [
'url' => 'link',
];
}
/**
* {@inheritdoc}
*/
public function getFieldFormatterMap() {
return [
'default' => 'link',
'url' => 'link',
'url_external' => 'link',
];
}
/**
* {@inheritdoc}
*/
public function processFieldValues(MigrationInterface $migration, $field_name, $data) {
$process = [
'plugin' => 'sub_process',
'source' => $field_name,
'process' => [
'uri' => 'value',
'title' => 'title', // Assuming that the URL field may have an optional title
'options' => 'options', // For any additional options that might be attached to the link
],
];
$migration->setProcessOfProperty($field_name, $process);
}
}
See also the module https://www.drupal.org/project/rip β
You can use https://www.drupal.org/project/config_track β in Drupal 9/10
In a custom module:
function MODULENAME_preprocess_superfish_menu_items(array &$variables) {
.... copy everything the first part of the function from superfish.theme.inc ....
$attributes = $item_attributes->__toString();
$menu_item_title = (string) $item['text'];
$menu_item_url = $item['url']->toString();
$link_element = '' . $menu_item_title . '';;
$link_element_menuparent = '' . $menu_item_title . '';;
$variables['menu_items'][] = [
.... copy the last part of the function from superfish.theme.inc ....
}
Copy superfish-menu-items.html.twig to your theme and add raw to the output of the menu links
{% if item.children is not empty %}
{{ item.link_menuparent|raw }}
{% else %}
{{ item.link|raw }}
{% endif %}
hansrossel β made their first commit to this issueβs fork.
hansrossel β created an issue.
hansrossel β created an issue.
The html structure has changed a bit, so here is an updated version of the code.
You can also use it in a script.js file in your admin theme.
Drupal.behaviors.termReferenceTreeExpand = {
attach: function(context, settings) {
$('.field-widget-term-reference-tree .form-checkbox', context).once('term-ref-tree').change(function() {
var isChecked = $(this).is(':checked');
// Toggle the collapsed state of the term tree
$(this).parent().parent().siblings('.term-reference-tree-button').toggleClass('term-reference-tree-collapsed');
// Toggle the show/hide of the child term list
$(this).parent().parent().siblings('.term-reference-tree-level').toggle(isChecked);
});
}
};
If
drush pm-uninstall MODULENAME
does not work due to an error, then you can also uninstall with:
drush eval "\$module_data = \Drupal::config('core.extension')->get('module'); unset(\$module_data['MODULENAME']); \Drupal::configFactory()->getEditable('core.extension')->set('module', \$module_data)->save();"
drush php-eval "\Drupal::keyValue('system.schema')->delete('MODULENAME');"
hansrossel β created an issue.