Latest Drupal related questions

Score: 0
I get a block that doesn't change on other pages
us flag

I have an issue with the contextual filters when I use Content: ID. On the site I get a repetitive, when there are many more recipes.

The block remains the same, with two recipes, which is fine, but they don't change on another page. It's always the same.

I hope this makes sense.

Recipes

Block

Contextual Filter

Recipes

Main Issue

Score: 1
Kevin avatar
Edit a node in the settings tray?
in flag

I am looking at this page in the Drupal docs for the Settings Tray and wondering if this can be used to edit the current node you are looking at, similar to this image:

enter image description here

Is there a way to edit all of the nodes fields from one tray? Is it expected that you would use QuickEdit (which is being discussed as being removed from core) to do this? What if there are fields that are not visible but you stil ...

Score: 3
chantdev avatar
Can BigPipe exclude certain blocks?
et flag

I've got BigPipe enabled in Drupal 8, and it helps to make pages initially load faster.

However, the header block is always one of the blocks that loads in on a delay, which visually looks bad since the content shifts down afterwards.

Is there any type of preprocess on a block to exclude it from BigPipe not be loaded on a delay, and force it to be in the initial page load?

Many thanks.

Score: -2
everapt avatar
Is the module fully compatible with Drupal 9?
cn flag

If I create a new project and install The Commerce Core module using Composer following the instructions given from the drupalcommerce.org documentation, it would install Drupal 8 by default, not Drupal 9.

I know there are ways to work around this and install Commerce Core on top of Drupal 9. Is it fully compatible with Drupal 9?

Score: 2
sonfd avatar
In the context of a multilingual site, what is considered "interface text" and what is "content"?
in flag

On the Language Selection and Detection configuration page (in the toolbar, Manage > Configuration > Regional and language > Languages > Selection and Detection), I see that I can detect and set "Interface text language" and "Content language" differently. But I don't see a clear definition of those terms anywhere.

I have a hardcoded heading within a node template:

<h2>{{ "Hello worl ...
Score: 0
Composer require installation profile constraint match error
us flag

I am trying to download this install profile https://github.com/UH-StudentServices/student_guide

I added it to composer.json like this

"repositories": [
        {
            "type": "composer",
            "url": "https://packages.drupal.org/8"
        },
        {
            "type": "vcs",
            "url": "[email protected]:UH-StudentServices/student_guide.git"
        }
    ],

Then I did composer ...

Score: 0
Joehoe avatar
A specified library is missing
tr flag

On a custom theme "foobar" (based on Olivero) this error message occured. This custom theme is a copy of drupals 9.2.2 olivero's theme.

Drupal\Core\Asset\Exception\InvalidLibrariesExtendSpecificationException: The specified library "foobar/cke-dialog" does not exist. in Drupal\Core\Asset\LibraryDiscoveryCollector->applyLibrariesExtend() (line 154 of core/lib/Drupal/Core/Asset/LibraryDiscoveryCollecto ...

Score: 0
Corentin Le Fur avatar
setError or setRebuilld methods breaks validation form
vn flag
<?php

namespace Drupal\my_custom_module\Form;

use Drupal\Core\Form\FormBase;
use Drupal\Core\Form\FormStateInterface;

/**
 * Class DefaultForm.
 */
class DefaultForm extends FormBase {

  /**
   * {@inheritdoc}
   */
  public function getFormId() {
    return 'default_form';
  }

  /**
   * {@inheritdoc}
   */
  public function buildForm(array $form, FormStateInterface $form_state) {
    $fo ...
Score: 0
Ivan Ginovski avatar
Display Node Local Tasks Menu on View
jp flag

I have a view that shows registrations for an Event (Content Type). This tab is shown in the /node/{node}/edit:

menuregistrations

This registrations tab refers to the view, which I have inserted in the routing.yml:

events.registrations:
  path: '/node/{node}/registrations'
  defaults:
    _entity_view: 'registrations.page_1'
  requirements:
    _custom_access: '\Drupal\events\Access\EventsRegistrationsAccess::checkAcc ...
Score: 2
jhnc avatar
correct way to access node-revision change property in twig
cn flag

I have a Drupal 8.9.17 website. My theme (based on Garland) includes in templates/page.html.twig:

{% if node %}
[...]
Last updated {{ node.changed.value|format_date('custom', 'D M d Y') }}
[...]
{% endif %}

This displays the property when viewing nodes at: /node/<nid>

However, when attempting to view revisions at /node/<nid>/revisions/<vid>/view, format_date() fails with "null times ...

Score: 0
"block_name" not found
cn flag

I installed the Twig Tweak module.

{{ drupal_block('block_name') }}

doesn't work. In Drupal logs I get the error

The "block_name" was not found

"block_name" I get from the config url of the block config page

admin/structure/block/manage/block_name?destination=/de/admin/structure/block

Do I do anything wrong?

Score: 0
Let anonymous user download pdf off his own webform submission
ng flag

I have configured entity_print with webform for D8 and can download a submission as pdf from the submission view.
Now I tried to let anonymous users fill out a form and added a link to the pdf on the confirmation page. I checked the show own submissions for guests on the permission page of that webform.
But when I try to access the pdf with the submited data I get a permission denied message.
http://m ...

Score: 0
scaffolding avatar
Updated: Webform tokens present user-submitted data for form fields
es flag

I'm attempting to build a webform (Webform 8.x, Drupal 8) that requires the ability for a user to submit the form multiple times.

To simplify the process for users, I'd like to set up some form fields to:

  • be empty by on their first visit to the form
  • for subsequent renders of the form, some form fields should be prepopulated with submissions from the previous submission

Is there a way to achieve this  ...

Score: 0
latikas avatar
Migrate nodes with Paragraph from json
ru flag

My goal is to import json file into Drupal 8 using Migrate modules (migrate_plus, migrate_tools). I use Paragraph module with fields like Name (entity reference) and composition (Number-float). And in node, I have title and other fields with Paragraph reference field. I do import, sometimes the node will be generated with blank paragraph name, If I reset migrate and try to import again, db logs gives fo ...

Score: 0
Editing media for content editor results in a 404
ve flag

We have a custom role, location_editor, which is assigned to users who can only manage media and one content type.

These are the role's media permissions.

screenshot

And if the user now tries to enter any valid media edit url (for example /media/35/edit - which does exist and was created by him), the result is a 404. The admin user can edit it just fine. The user can also access /media/35/delete without problems. ...

The Stunning Power of Questions

Much of an executive’s workday is spent asking others for information—requesting status updates from a team leader, for example, or questioning a counterpart in a tense negotiation. Yet unlike professionals such as litigators, journalists, and doctors, who are taught how to ask questions as an essential part of their training, few executives think of questioning as a skill that can be honed—or consider how their own answers to questions could make conversations more productive.

That’s a missed opportunity. Questioning is a uniquely powerful tool for unlocking value in organizations: It spurs learning and the exchange of ideas, it fuels innovation and performance improvement, it builds rapport and trust among team members. And it can mitigate business risk by uncovering unforeseen pitfalls and hazards.

For some people, questioning comes easily. Their natural inquisitiveness, emotional intelligence, and ability to read people put the ideal question on the tip of their tongue. But most of us don’t ask enough questions, nor do we pose our inquiries in an optimal way.

The good news is that by asking questions, we naturally improve our emotional intelligence, which in turn makes us better questioners—a virtuous cycle. In this article, we draw on insights from behavioral science research to explore how the way we frame questions and choose to answer our counterparts can influence the outcome of conversations. We offer guidance for choosing the best type, tone, sequence, and framing of questions and for deciding what and how much information to share to reap the most benefit from our interactions, not just for ourselves but for our organizations.