Upgrade from 8.3.4 to 8.3.7 almost works.

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.

Change field widget programmatically

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

\Drupal::entityTypeManager()
->getStorage('entity_view_display')
->load($entity_type . '.' . $bundle . '.' . $view_mode);

Why won't alias or actual node relative URLs work for internal links?

Hi!

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.

Custom template for content type. Content in template is empty.

Hello,

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;
    }
}

and files like:

Fatal error after upgrading from 8.35 to 8.37

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.

How to use findTaggedServiceIds() function?

Hi,

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.

Pages

Subscribe with RSS Subscribe to RSS - Drupal 8.x