Latest Drupal related questions

Score: 0
Toki avatar
Error page after Paybox offsite validated payment
id flag

Working on Drupal 7.81 and Commerce Paybox 7.x-1.3

Everything is going well except for the redirection from Paybox to my e-commerce site, I constantly have an error page after redirection. Paybox refers to https://monsite.org/checkout/[order-number]/payment/return/hash ... and displays an error page, while behind everything is validated (I receive confirmation emails from ordered). Once refresh, I find ...

Score: 1
Loopy avatar
What is the new methodology for Form Pre-Render in order to utilize TrustedCallbackInterface
cn flag

We are upgrading our sites one at a time from Drupal 8 to Drupal 9 and there is one line of code in our custom theme that is the last of our problems.

We get the following error on View that uses an exposed filter:

Drupal\Core\Security\UntrustedCallbackException: Render #pre_render callbacks must be methods of a class that implements \Drupal\Core\Security\TrustedCallbackInterface or be an anonymous fu ...
Score: 1
Matoeil avatar
drupal9 dev mode local settings : non existing cache.backend.null
za flag

In drupal9 my drupal8 local.settings.php conf generate an error when i empty cache

Symfony\Component\DependencyInjection\Exception\ServiceNotFoundException: You have [error] requested a non-existent service "cache.backend.null". Did you mean one of these: "cache.backend.apcu", "cache.backend.memory", "cache.backend.php"? in /data-platforms/platforms/drupal9-dev/core/lib/Drupal/Component/Dependency ...

Score: 0
Custom REST resource - add pagination
cn flag

I have quite a few custom REST resources like class Xyz extends ResourceBase {...}. How do I add proper pagination for GET resources? All I found so far is only valid for REST Views. Any hint where to start?

Score: 0
Jiah avatar
Plugin not found/invalid plugin error while creating VBO custom action
in flag

I am creating VBO custom action and I constantly see the below error:

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "publish_TR_action" plugin does not exist. Valid plugin IDs for Drupal\Core\Action\ActionManager are: node_export_action, comment_unpublish_by_keyword_action, entity_delete_action:comment, node_assign_owner_action, node_unpromote_action, node_promote_action, node_make ...
Score: -1
Sourabh singh avatar
How do I add link to Edit and Delete in a column in a view table item list?
gp flag

I've trying to add a link to Edit and Delete column to perform desirable actions. I need help in implementing it. I've tried several suggested methods on the internet, but none did the job for me. Maybe I am doing something wrong.

Here is my Controller.php

public function getAdList(){
            $limit = 3;
            $query = \Drupal::database();
            $result = $query->select('ad_form_submis ...
Score: 0
gkpo avatar
How do I create a tab with secondary tabs?
au flag

I created a view to display all Car ad nodes. This is what I want to achieve (in terms of tabs).

  • Administration
    • Content
      • Car ads (I managed to create this tab already)
        • Published Car ads
        • Sold Car ads

My problem is to create the 2 secondary tabs.

The view has 3 displays, but the default display is the published one. From what I've read, the top display just acts as a container for the 2 othe ...

Score: 1
Matoeil avatar
is it possible to deactive twig cache for a single theme custom template?
za flag

i am having a custom template for rendering a medialink url from a paragraph media entity ref field. In production with twig cache activated, modifiying the media attached file , does not update the content making reference to that media, unless the render cache is emptied.

paragraph--link-media.html.twig

{% set classes = [
  'paragraph',
  'paragraph-link-media',
] %}
{% set link_classes = [] %}
{% s ...
Score: 0
Controller on /taxonomy/term/{taxonomy_term} route
lc flag

I have a regular Controller on the taxonomy term page (the original view is disabled). It works all right to show what I want it to show, however, neither its getTitle nor its access is ever called (the second being more vexing, of course). The problem is not with my controller, because using a different route works just fine:

example.content.documents_list:
  path: '/taxonomy/term/{taxonomy_term}'
  d ...
Score: 1
ilechcod avatar
Restrict Menu Item Visibility by Permissions
in flag

I have a module-generated menu (using yaml file) with 5 menu items. My requirements don't allow me to restrict menu item visibility by role because roles can be dynamically added. So I have to do this using permissions only.

What I've tried
(1) Restricting menu item access using route permissions - this shows a page forbidden but still allows the restricted menu item to be visible

Please see my actual fi ...

Score: 0
$container not initialized after installation from sources (code and database)
cn flag

I'm working on a site installed with Composer. After the local installation broke, I'm trying to reinstall the project from source code and the MySQL database. All the sources are versioned on Git (including the /vendor folder).

After Acquia installation, all the pages return a 500 error. When I run drush ws to debug, I get the following error message.

Drupal\Core\DependencyInjection\ContainerNotInitial ...

Score: 0
How do I automatically add a title to imported entities?
cn flag

I have a site with a lot of audio files (using core's Media audio media type).

On the Manage form display admin page (/admin/structure/media/manage/audio/form-fields), I have set the Name field to Disabled.

This way, when I add a media audio entity in the UI (at /media/add/audio), then I don't have to add the title, and the entity name will automatically be set to the file name.

Now I want to autom ...

Score: 0
How can I print the Layout builder in a node twig template?
eg flag

After enabling Layout builder for Page content. I can see in Manage fields, a new field called layout_builder__layout. I want to print this inside node--page twig template. This should work but it does not. {{ content.layout_builder__layout }}. Printing all the content does display it like this {{ content }} How can I print only the layout builder?

Score: -2
samdesigncodes avatar
Maestro workflow status block
in flag

After adding the Maestro status block to my homepage-content region, it doesn't display the status bar nor the status messages which were set in the workflow. It displays only the workflow title.

3 of my workflow Participate in Setting the Workflow Stage and Status Message yet it displays only the title of my maestro workflow.

I took time to inspect the "Maestro Insurance Site" a demo site created b ...

Score: 0
mathieu avatar
Cannot add user picture for administrator
mw flag

I installed 2 servers with Drupal 9.1 and I updated to Drupal 9.2

I just noticed that there are problems with the modification of the administrator account "user 1".

In the list of users, the role of the admin account is "Administrator", but if I modify the account, only the "Authenticated user" box is checked. If I check the "Administrator" box and register the account, no changes are registered. ...

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.