Latest Drupal related questions

Score: 1
Ex0r avatar
Using a #submit callback on a textfield
cn flag

We have a need to add 'repeatable fields' to a form based on input provided in a textfield. Usually, we use a 'add another' button to keep track of the number of fields to render in the buildForm(), and update that number in a submit callback on the button.

The functionality we want isn't that, though. We have a need so that when somebody enters text into a textfield (other than empty), it adds an addit ...

Score: 1
I installed Solr for the Search API Solr can someone can give me hints what i could have done wrong?
br flag

I'm currently running a CentOS 7 server with cPanel and Drupal 8. I installed Solr 8.8.1 and I can access the administratrion page where I an able to create cores. I installed the Search API module with Composer.

When I try to use the Solr server via the Search API module, I get a server connection error.

I tried a lot of Drupal configuration, with Basic Auth and standard, via localhost, IP and domain ...

Score: 0
Harv avatar
Permissions suddenly changed
jp flag

I've inherited a drupal 7.6 site with a broken css (styles were not loading). Here's what I've done so far:

-set sites/default/files, tmp and cache folder to 777. -flushed all caches

When this didn't work, I deleted the /files folder and created a new one which has done the trick.

I'm still getting "The file permissions could not be set on cache/normal/..." in recent log messages. in the cache folder,  ...

Score: 0
Roi1001 avatar
How to export view's translation?
cn flag

I used view translate(/admin/structure/views/view/my_view/translate) to translate a filter's label and saved. When I refreshed the view, it worked. Then I went to /admin/config/regional/translate/export page to export the same language's translation, including customized and non-customized, as .po file. But I couldn't find the translation I made in the file.
So how should I export the view's transla ...

Score: 1
jbreslow avatar
How to display 'Welcome [first_name] [last_name]' in a custom views block? D8
ae flag

I would like to create a custom block / view to display a welcome message to the currently logged in user in Drupal 8. I followed this answer but it isn't working for me. Maybe things changed in D8. Is there a way to do it in D8 and / or am I doing something wrong?

I've added a bunch of Fields and Contextual Filters trying to get it to work but nothing shows up.

enter image description here

Score: 1
mathieu avatar
How do I avoid overwriting the .htaccess file when I use the Compose command?
mw flag

On my new Drupal 9 website, I customized the .htaccess file and the robots.txt file

I don't want its files to be overwritten when updating with Composer.

I added the lines below in my composer.json file but the .htassess file is overwritten every time. What's wrong with my code ? Thank you

"extra": {
    "drupal-scaffold": {
        "locations": {
            "web-root": "./"
        },
        "file-mapp ...
Score: 0
Sharing articles on Social media loses the images after posting
pg flag

This seems to have only happened recently. Has anyone found a fix? I'm using D7 with Metatag, Metatag:Facebook & Metatag:Opengraph.

However, I'm not convinced the issue is with any of these modules, and here is why:

When I share an article on facebook (other platforms are doing the same), the image shows correctly in the preview but when it is displayed on a user's profile, either no image or a  ...

Score: 0
mike avatar
Updated versions aren't shown in the back-end
cn flag

I have problem while updating drupal from 9.1.4 to 9.1.9. in my composer.json path i have seperate installer path for a folder name example2.com which contain core, modules,etc... on the first time drupal core updated got into the folder web root directory. after i changed the installer path in composer.json and tried to update composer ouput "Nothing to update" message. Also deleted composer.lock file  ...

Score: 0
miststudent2011 avatar
How do I install Drupal with multiple custom languages using drush?
fr flag

I know I can install a new Drupal web site with single custom language using:

$ drush si standard \
    --db-url='mysql://[db_user]:[db_pass]@localhost/[db_name]' \
    --account-name=admin --account-pass=secret\
    --site-name=Example \
    [email protected] \
    --locale=it

Similarly how can I pass multiple languages to locale key ?

--locale='it','uk','de' 

doesn't work neither doe ...

Score: 0
bigboy avatar
Display title, based on exposed filter of view
gu flag

I've read these questions:

But it did not help.

My Drupal version is 9.1.9. I have views displaying Taxonomy terms. Each taxonomy term has fields, for example "Genre". I have 16 different genres with "key|value" type.

I have exposed filter, based on genre field. I've added this field to Contextual filters ...

Score: 2
Problem removing field collection module
cn flag

We recently migrated successfully in our drupal 8 instance from field collection module (latest alpha) to paragraphs. Now I am trying to remove the field collection module from our drupal instance, but it cant be removed as it is "used in the field field_collection_item.field_sprechzeiten_zeitraum" (see screenshot from uninstall view).

uninstalling field_collection is prevented

When I try to delete this field field_sprechzeiten_zeitraum, t ...

Score: 0
Content Translation installation breaks the website (statistics module error + aliases not taken into account)
in flag
Dna

First, I would like to say I am a total noob in Drupal and PHP but possess some knowledge on other web frameworks/languages).

Here is my path to the errors:

I used the UI to install Content Translation and Configuration Translation modules from the multilingual core (other 2 modules were already installed).

This did not work properly as it totally broke the website:

  • aliases not respected (from "/co ...
Score: 0
mts11 avatar
ckeditor not loading rich text editor by default
cn flag

I'm running CKEditor 7.x-1.19 with Drupal 7.80.

With "Default editor state" set to Enabled, and "Show the disable/enable rich text editor toggle" set to Show, my system is still loading the plain text window. I can then manually toggle to the rich text editor. I see this when creating new nodes or blocks, and also editing existing nodes and blocks - I think anywhere I'd expect the editor to load. ...

Score: 0
Usman Manzoor avatar
Translating Menu Item Programmatically?
pk flag

I have been trying to translate menu items programmatically but upon saving it just adds the english field value to all my translations. Below is the code I am trying to execute:

 if ($entity->hasTranslation($language->getId())) {
      //For update
      $entity->removeTranslation($language->getId());
    }
    try {
      $entity->addTranslation($language->getId(), ['title' =&gt ...

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.