Latest Drupal related questions

Score: 0
stoncu avatar
Views contextual display based on taxonomy for no value
cn flag

I have a content type that has a name field and a taxonomy field that contains cities. I want the view to display by default the city as title and the message "nobody lives in city X" for each of the cities, i.e. "Nobody lives in New York" before I create any content. Once I create a person and select New York, it should display "John lives in New York". I assume this involves contextual filters and may ...

Score: 0
How to get current user jwt token?
ni flag

In a custom module, I need to get the jwt token (access_token) related to the current user. Following this issue I've tried to get it, but without success, because get_jwt_key() and jwt_token_params() are not defined and I can't find where they are defined:

use \Firebase\JWT\JWT;
...    
public function getAccessToken() {
  $uid = \Drupal::currentUser()->id();
  // Add JWT access_token
  $key = get_ ...
Score: 1
calfie avatar
Parent node needs to display the scheduled date that is referenced in the child node
sa flag

I'm not sure how best to approach this problem and I'm hoping someone can point me in the right direction.

Quick summary of the setup of some nodes: Node A is the parent node. Node B is a child of Node A. Node B also houses/displays webforms. We have a "form" field in Node B where we can call existing webforms and Node B will then display the webform and any additional information (entered in No ...

Score: 0
Bandita Pattanaik avatar
Upgrading core from 8.7.10 to 8.9.16
my flag

My current site version is running on Drupal 8.7.10 and I want to upgrade it to 8.9.16.

I backed up all the files and folders. Should I backup the Pathauto module, update the new Pathauto module, and start upgrading the site?
Are there other steps I need to take? How can I proceed with the update?

Score: 0
Jake13 avatar
How to remove home in a breadcrumb from a specific page in easy breadcrumbs and add carets for the breadcrumbs?
us flag

I've been using the easy breadcrumb module in Drupal 8, I enabled the option - "Include the front page as a segment in the breadcrumb" for all pages, but there are few pages for instance /custom-page where the breadcrumb trial is (Home Custom-page) how do I remove the home from these custom pages in .theme file or any alternate settings. Also the carets(>) are not appearing between the segments, ho ...

Score: 2
Giuseppe avatar
How do I apply patches from a merge request?
br flag

I used the patch #48 of Views exposed sort identifiers are not configurable. I need to update the core, and apply the latest rebased version of that.

However, the issue hasn't be marked Fixed, and I don't see any "patch file" to link in my composer.json.

How can achieve this?

Score: 0
matsbla avatar
How can I make a widget similar to the media library, just for other entities?
pe flag

I want to make widgets similar to the one that is provided by media library, but just for other entities, for instance Bibliography & Citation or even just other content. Is it possible to build similar widgets using configuration or is custom code needed?

Score: 0
Webform token won't render value in iframe
kr flag

I have an iframe in which I'm trying to include a token which is a value from a select list. In the code below, this value:

[webform_submission:values:choose_video:raw]

Won't render in the iframe, but does render directly below it, in a P tag. Is there some filter I have to apply? When I do include the token, the all the greater and less than symbols are escaped in the iframe. Code is below. Thanks fo ...

Score: 0
Vivank Sharma avatar
Extract more data on field_collection_item from REST APIs of Drupal
lb flag

I am trying to display information regarding Contributed modules available on Drupal programmatically.

For that, I am taking the help of this documentation : https://www.drupal.org/drupalorg/docs/apis/rest-and-other-apis

When I am calling API like: https://www.drupal.org/api-d7/node.json?field_project_machine_name=ctools

In return I am receiving a JSON object with the following details:

"field_supp ...
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 ...

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.