Latest Drupal related questions

Score: 1
Making an HTTP subrequest causes CurrentRouteMatch to have the wrong route
by flag

For complicated and unpleasant reasons[*], I want to embed entity data from the JSONAPI module inside JSON returned from a REST module resource.

I am trying to do this by making an HTTP subrequest to the JSONAPI module route within the REST module resource class.

Like this:

    $kernel = \Drupal::service('http_kernel');

    $current_request = \Drupal::request();

    $request = Request::create('/jsonapi ...
Score: 0
How to allow   (and other HTML entities) in ckeditor?
ru flag

Our customer want to be able to add thin spaces in addition of non breaking spaces. But when we try to add the character   in source of ckeditor, ckeditor doesn't keep it and convert it as a basic space.

After research, it seems ckeditor allow the entity  . I don't know if I have a configuration which prohibit this (I tested with full html profile with non html correction, that' ...

Score: 0
sonfd avatar
How can I get a route's name if I have the route object?
in flag

I have a route object (which may not be the current route's object) and I need to get the route's name, e.g. entity.node.canonical. I don't see any method to get the name directly from the object, nor do I see it anywhere when I inspect the object via Xdebug.

I know that I can easily get the name of the current route with $current_route_name = \Drupal::routeMatch()->getRouteName(), but how can I g ...

Score: -1
How can I add an accordion?
na flag

I would like to create an accordion using the Drupal 9 webform. Any suggestions on how it should be done? Thanks enter image description here

Score: 0
Options for storing API keys in config files?
in flag

I'm working on a project that's using Drupal Commerce and wondering about the possible options to secure the API keys exported as configuration YAML files.

We have the config directory outside of the web root and are fairly careful overall with security, but we currently have those committed to our private Git repository - should those be removed from the repository entirely, regenerated, and add ...

Score: -1
Monster971 avatar
Rules Custom Field
id flag

I am developing a Drupal site, where the administrator creates user accounts. Indeed for this site the administrator creates user accounts, he fills in the fields with the strict minimum (Last name, First name, Mail).

When the user logs in, I would like the site to force him to fill in the remaining fields of the profile.

For this I wanted to use the Rules module, with:

  • Event: User has logged in

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.