Latest Drupal related questions

Score: 0
Nitro avatar
Disable "Edit" button for parent menu items
gb flag

Is there a way to disable the edit button for parent links only? We want our content editors to only be able to edit the child menu items.

We are using the latest version of Drupal 9.

Thanks in advance for any suggestions.

menu screenshot

Score: 2
"A non-existent config entity name returned by FieldStorageConfigInterface::getBundles()" errors in watchdog
jp flag

After migrating from 7 to 9, I'm getting a lot of these errors in watchdog, from views.

A non-existent config entity name returned by FieldStorageConfigInterface::getBundles(): entity type: paragraph, bundle: iframe, field name: field_url

Things I've tried:

  • Checking paragraph bundles(types): there are only two, the iframe one does not exist (I don't need it in the new site).

  • drush cr

  • drush conf ...

Score: 0
mauzilla avatar
Applying trim to paragraph value
cn flag

I have the following Paragraph template which displays a heading with a trailing orange dot. The field itself is a normal text field in Drupal. For some reason, there is a trailing space after the heading, which leads to a space between the heading and the dot. I want to remove it (and |trim is the answer), but when I add trim to the below variable I get a PHP warning saying parameter 1 should be a str ...

Score: 0
Mike Graeme avatar
how to use the user who submitted the webform as a token
cn flag

i set up user accounts for my staff and i have added custom field "field_role". i enter information here.

my staff then enter their details in a webform. i want the webform to automatically enter "field_role".

the problem is i can't find a token like [user:field_role]. the only option allowed is [current-user:field_role]

why this is a problem is the webform automatically updates the field if i use [cur ...

Score: 0
MacSim avatar
Perform entityQuery with multiple fields conditions on referenced fields
um flag

I have an article node type with a field referencing related articles. If an article has less than 4 references for that field, I need to search for other articles which

  • are not the current node
  • have been updated less than 2 years ago
  • have a checkbox 'favorite' checked
  • share at least one culture id (taxonomy reference) AND at least one theme id (taxonomy reference)

And I am actually wondering how to ...

Score: 0
Default product URL for a pager
cn flag

Does anyone know how to get around the view error about the default product that doesn't have a URL?

The Commerce module has a default product and the view pager works without a More link, but it errors out with one.

screenshot

Score: 1
Todd Wellman avatar
Update.php gets "The page isn’t redirecting properly" error page
eg flag

I recently moved our site to a new hosting company. After uploading all the files and importing the database I get this notice when I try to Run Updates and/or accessing the update.php page.

The page isn’t redirecting properly

An error occurred during a connection to oursite.com.

This problem can sometimes be caused by disabling or refusing to accept cookies. Try Again(button)

I moved the site f ...

Score: 0
klewis avatar
How to configure trusted hosting pattern for Docker containers
de flag

From Drupal 8, if my running Docker project for Drupal is loading in my browser at...

http://docker.drupalphp:17223/

what should I put in my sites/default/settings.php file to approve the trusted_host_patterns settings?

I have tried sooooo many things, including this simple one...

$settings['trusted_host_patterns'] = array(
  '^docker\.drupalphp$',
);

But no luck on getting the trusted host pattern a ...

Score: -1
Dependency injection in create() method of block plugin with derivatives
us flag

I am trying to extend the menu_block module to allow it to work with domains (via the domain module). In order to do this I am extending the MenuBlock class, and trying to access the domain.negotiator service from within getDerivativeID(). I am using the create() method to inject the service and store it to a $domainNegotiator property as follows:

  public static function create(ContainerInterface ...
Score: 0
MrSnrub avatar
Files with 644 permissions and owner apache:apache are still failing Security Review module
in flag

I am using Drupal 7 and just installed Security Review. According to this page, the files should be 644. I tried that but I am still failing Security Review (I'm getting hundreds of files under the section "The following files and directories appear to be writeable by your web server." I assume this is because the files are owned by apache:apache. What are the correct file ownership and file group membe ...

Score: 4
May  avatar
How do I override a single JavaScript file used in a library?
zw flag

I am trying to override the Search API autocomplete JavaScript file. In mytheme.libraries, I added the following lines.

mytheme_autocomplete:
  js:
    'assets/js/autocomplete.js': { }

In mytheme.info, I added the following lines.

libraries-override:
  search_api_autocomplete/search_api_autocomplete:
    js:
      component:
        js/search_api_autocomplete.js: mytheme_autocomplete

When I visit the  ...

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.