This forum is for module development and code related questions, not general module support. For general support, use the Post installation forum.

Unmet dependencies

I've created a custom module (it basically creates a custom content type with a custom field). When I try to install it on a freshly installed Drupal 9.4.2 website, I get:

Unable to install My Module due to unmet dependencies:
field.field.node.my_module.field_mymodule_myfield (field.field.node.my_module.field_mymodule_myfield ),
language.content_settings.node.my_module (language)

What does this error message mean?

Using 2 DB connections problem

Hi all,
I have setup 2 DBs:
1. $databases['default']['default'] = ...
2. $databases['external']['default'] = ...
than when I want to use the external I use:
\Drupal\Core\Database\Database::setActiveConnection('external');

Content Entity Type - entity collection route not created

Hi All

I am creating new Content Entity Type called product (in latest Drupal version 9.4.2).

I have created entity plugin and added annotation (below I include sections needed to create entity routes):

in handler section i have:

"route_provider" = {

* "html" = "Drupal\Core\Entity\Routing\DefaultHtmlRouteProvider",

* },

admin permissions:

admin_permission = "administer contact entity",

in the links:

* links = {

Call entity

Hi sorry for the question but im new and im starting to undertand abou entities but is still hard for me. IM not sure about how to call the entities.

Here i didnt have a problem tu get the number.

$price= \Drupal::entityTypeManager()->getStorage('commerce_order_item')->load($id)->get('unit_price')->getValue()[0]['number'];

But here i dont undertand why i could not take a percentage y try to many combinations. Maybe some one can show me the proper way to write this.

Getting appropriate response from drupal page variant API

Hi,

So, I have been trying to get the desired response from the below two apis but haven't found an efficient way to call (chain the two apis).

What i do i, I call the first API (/page_variant) to get a set of block id and then use that id to call the second api, as shown below -

Pages

Subscribe with RSS Subscribe to RSS - Module development and code questions