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

The controller result claims to be providing relevant cache metadata, but leaked metadata was detected.

Hi I've created a module with a controller but now i'm getting this message;

LogicException: The controller result claims to be providing relevant cache metadata, but leaked metadata was detected. Please ensure you are not rendering content too early. Returned object class: Drupal\Core\Cache\CacheableJsonResponse. in Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber->wrapControllerExecutionInRenderContext() (line 154 of core\lib\Drupal\Core\EventSubscriber\EarlyRenderingControllerWrapperSubscriber.php).

How to use path alias in views with exposed filter?

Hello,

In Drupal 9 installation there is a view where nodes are listed. Now I want to do two things.

1: add a field with the path alias to the view.

2: add an exposed filter to filter path aliases.

Unfortunately I am not able to do this. The only way to add a field with path alias is the field "Link to Content", which can be output as plain text. But I cannot define an exposed filter for this field.

Tag Cloud Module

Hi everyone!!

I have installed recently the TagCloud module https://www.drupal.org/project/tagclouds, i want to change some style settings with css to this block! How can i do that?

I am α begginer on drupal project sorry if the question is simple!!

Thank in advance!

Is it possible to move release tag in git?

Hi,

I've created a tag in git 8.x-1.0 and added a release to it. Is it possible to move this tag to the latest commit of 8.x-1.x?

I've tried:

git tag --force 8.x-1.0 <latest-commit-id>
git push --force --tags

remote: The tag 8.x-1.0 is tied to a release on Drupal.org, and cannot be relocated or deleted.
remote: error: hook declined to update refs/tags/8.x-1.0

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');

Pages

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