Still on Drupal 7? Security support for Drupal 7 ended on 5 January 2025. Please visit our Drupal 7 End of Life resources page to review all of your options.
I have a test Drupal 8 site on my local windows 10 PC created with Dev Desktop. It is configured to bug me by email when there are updates and upgrades available. These messages are telling me to upgrade to 8.3.7 immediately.
I've created an Integer type field using Entity\FieldConfig::create() and I would like to change the Field Widget to my custom one programmatically. I'm able to select my widget from an edit-form and it works, but I have no luck with code. The entity_get_display is deprecated so i tried to use
I am building a site on my local PC under XAMPP. On my front page, I have a custom block where I want to make some links referencing other pages within the same site (internal links). These other pages are also listed within the Main Menu section. However, neither relative actual nor alias URLs seem to work.
I want create custom template for each content type.
I have defined mytheme_theme_suggestions_page_alter(..) and files in /templates/*.html.twig. The problem is that drupal dont load content to template.
mytheme.theme
function mytheme_theme_suggestions_page_alter(array &$suggestions, array $variables) {
if ($node = \Drupal::routeMatch()->getParameter('node')) {
$content_type = $node->bundle();
$suggestions[] = "page__".$content_type;
}
}
I am getting this fatal error after upgrading from 8.35 to 8.37 :
"Call to a member function access()" on "core/modules/block/src/BlockAccessControlHandler.php" on line 119
Any ideas ? I don't understand what I can do ?
Many thanks for your help.
I want to create a function that enumerate of my services by the tag. I found findTaggedServiceIds but how I can get ContainerBuilder variable? \Drupal::getContainer returns \Symfony\Component\DependencyInjection\ContainerInterface but I need ContainerBuilder interface.