Top new questions this week:
|
I’m often frustrated by entityTypeManager because when I load entities, the typehint for the return value of the load methods is EntityInterface, but I want it to be a more specific interface (which I …
|
Is it possible to create a redirect for documents using the Redirect module? I can’t seem to find a solid answer. Basically I’m just trying to create a redirect from www.example.com/default/…
|
I have tried to apply my custom class to an image tag I have set classes for it {% set imgClass = [ ‘img-shape-‘ ~ (node.field_image_animation_shape.value|clean_class) ] %} and have …
|
I am using Drupal version 9.3.14. Option “My billing information is the same as my shipping information.” gets available on checkout page automatically. But when creating order from Admin …
|
Coming from drush 7. I used to install modules using “drush dl module_name –select” and I get a list of module versions I can select to download. Is there an equivalent for this for drupal …
|
I have a service wich is loading a config at construct time: class MyService { public function __construct(ConfigFactoryInterface $config_factory) { $config = $config_factory->get(‘my.config’)…
|
I’m using Drupal 9 with Commerce 2. I have a large number of product types that need to be created. I have for each product type which fields need to be added. Let’s say this information is stored in …
|
Greatest hits from previous weeks:
|
I have a node that has a few field collections on it. When I look at node_load() output, I see: [field_rich_text_group] => Array ( [und] => Array ( …
|
I’m using paragraphs in my content type. I’ve created a paragraph type and added content. Now I want to load the paragraphs in a foreach. But nothing’s showing up. $paras is empty: $node = \Drupal\…
|
I installed Drush 8 with composer. composer require drush/drush:~8 Unfortunately, error drush command not found after Drush completely installed. Why’s the drush command can’t be use? Installing …
|
In Drupal 7, I use the following code. function my_goto($path) { drupal_goto($path, array(), 301); } What code should I use in Drupal 8?
|
I have an twig file: views-view-unformatted–view-machine-name.html.twig {# /** * @file * Default theme implementation to display a view of unformatted rows. * * Available variables: * – title: …
|
In Drupal 7, I could manually edit the {system} table in the database to disable a stubbon module. In my Drupal 8 site, this table is gone. How can I manually disable a module in Drupal 8?
|
I have a question about getting a path to an image in a Twig template. The image is not assigned to a field or something. Just a static image which is stored in “MYTHEME/image/icon/my-icon.png”. In …
|