Latest Drupal related questions

Score: 0
ArK avatar
Why isn't the Endroid\QrCode\QrCode found?
cn flag
ArK

I created a custom module and installed the endroid/qrcode library in my module using Composer. When I try to use that library, I get the following error.

Error: Class 'Endroid\QrCode\QrCode' not found in Drupal\shopexp\Plugin\Block\ShopExp->build() (line 25 of modules\custom\shopexp\src\Plugin\Block\ShopExp.php).

The code using the library is the following one.

namespace Drupal\shopexp\Plugin\Bl ...
Score: 0
Dileep G avatar
How can I uninstall the "Simple OAuth (OAuth2) & OpenID Connect" module?
it flag

After installing the Simple OAuth (OAuth2) & OpenID Connect module and its dependencies, I got this error.

The website encountered an unexpected error. Please try again later.

I want to uninstall the module,but it doesn't work. The same happens for the Consumers module, from which the Simple OAuth (OAuth2) & OpenID Connect module depends. When I try, I get this error.

Base table or view n ...

Score: 0
Usman Manzoor avatar
Email formatting for a file field?
pk flag

I have a webform with a managed file field. I need to send that field in the email as well. I have added the submission:values field, but it doesn't add spaces between the filename and the file size.

I need to add a space between the file name and its size. How can I achieve this?

Score: 2
Delford Chaffin avatar
Migrate order billing profile
gg flag

I'm trying to migrate order data from an existing site using CSV files and I can't get the billing profile to relate.

In trying to troubleshoot this, I have it set just to insert a default value of a known profile and it's still not working for me. Currently, in the process section of my YML migration file I have these lines, but I still end up with <null> in the database.

billing_profile/targ ...
Score: 1
Don't see Mail System under Configuration
eg flag

I'm currently going through the prerequisites of Acquias configuring platform email https://docs.acquia.com/cloud-platform/manage/platform-email/platform-email-configuration/#associate-domain

but I do not see the Mail System to check what our default Mail System is. Does this mean We are using a different one? I do see Nemo Integration but still expected to be able to access Mail System.

enter image description here

thanks

 ...
Score: 0
Access product field from variation field
cn flag

There are a bunch of product images that are named same as SKU, so I'm just using field--commerce-product-variation--sku.html.twig to show them. All is fine.

I'd like to use the parent product image as fallback image for when the SKU image doesn't exist.

How do I access a parent product field from the product variation field template?

Score: 0
Programatically reorder referenced entities by field
es flag
gr8

I have a content type Speaker that uses an Event content type as reference. The Event has a start date and time field. There can be any number of events that a speaker speaks at, when visiting the speaker page, the events are not ordered by date, they are ordered by id. How do I programmatically change this?

I am able to get the field value and sort them by date, but I am not able to set them bac ...

Score: -1
ashique avatar
How do I add ajax callback to a form element which is created in a foreach loop
cn flag

Please see the following code:

foreach ($formaddresses as $key => $val) {
  // Add edit buttons to custom client-side created addresses.
  if (!isset($val['accountnumber'])) {
    $form['orderinfo']['billshipaddresses']['billingaddresses'][$key]['#description'] = '<a class="edit-stored-address edit-stored-address-target-' . $key . '">Edit</a>';
    $form['orderinfo']['billshipaddress ...
Score: 0
SomebodySysop avatar
modify custom block using hook_entity_type_view_alter()
gb flag

In Drupal 9, I am trying to use hook_ENTITY_TYPE_view_alter() to modify the body field of a custom block.

However, I don't know how to access the data in the $build array to change it. This is a partial dump of the $build array. I want to modify the HTML links in the body field.

array(8) {
  ["#block_content"]=> object(Drupal\block_content\Entity\BlockContent)#4946 (30) {
    ["theme":protected]=> ...
Score: -1
unixmiah avatar
Unable to install modules: module 'login_security' is incompatible with this version of Drupal core
cn flag

I'm trying to install the Login Security module. When I run drush en login_security, I get the following error.

In ModuleInstaller.php line 91:

Unable to install modules: module 'login_security' is incompatible with this version of Drupal core.

What is the equivalent of the Login Security module for Drupal 9?

Score: 1
Taku Fujita avatar
How do I get all the entities for which at least one of the filter conditions is true?
id flag

I set Filter type to expose to Grouped filters.

screenshot

Then, I set the filter values.

screenshot

The view returns entities for which all the conditions are true. How can I get all the entities for which at least one of those conditions is true?

Score: 0
TMa avatar
Filter to embed content of another node
br flag
TMa

I'm migrating site from ancient Drupal 4.7 to Drupal 9.

Does exist a filter which substitutes an in-text macro e.g. {{nid:123}} with content of node 123 ? Seems latest implementation is https://git.drupalcode.org/project/node_embed/ for Drupal 7. Also I'm looking for a feature how to put view reference in text, e.g. handy to display more views on one page without playing with blocks or so.

Unless s ...

Score: 1
DHB avatar
Can I pass a view's exposed filter values to the next page?
us flag
DHB

I have a D8 site view with exposed filters. I want the selected filters from that view to carry over to the next page's URL.

For example: The page lists software titles. If someone filters on OS, and picks MacOS, the URL of the view page changes from "viewpage" to "viewpage?os=MacOS". I want to make the links in the view change from "drupalpage" to "drupalpage?os=MacOS".

I can't figure out how to ad ...

Score: 0
Elixane avatar
Changing base theme directory
jp flag

I have inherited an 8.x site using ZURB Foundation as a base theme. However: Foundation somehow got installed twice, once in docroot/themes/zurb_foundation (8.x-6.0-alpha4) and once in docroot/themes/contrib/zurb_foundation (8.x-6.0-alpha5). According to the Appearance admin page, the one not in the contrib folder, 8.x.6.0-alpha4, is the active theme. I suspect that got installed manually, used as the  ...

Score: -1
druque avatar
One time … landing page?
ve flag

I’m building a Drupal 9 site and would like to have a one-time landing page that any visitor sees with various images when they first visit, then if they click on any image, or anywhere on the page for that matter, they go to the site’s home page, which stays as the home page for the remainder of that session. It’s sort of a like getting a splash when you first visit home, only I don’t want a m ...

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.