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

No theme() function in Drupal 9

Drupal 7 used to have a function named "theme()" to return "themed" output: https://api.drupal.org/api/drupal/includes%21theme.inc/function/theme/7.x

I'm upgrading Notify to Drupal 9 and it leverages on Advanced Help to provide help topics. Example:

$output = theme('advanced_help_topic', [
  'module' => 'notify',
  'topic' => 'users',
]);

How to do this in Drupal 9?

[Solved] Is it possible to block Drupal from processing all modules inside a Custom folder (i.e. modules/XYZ)

I believe some HTACCESS solution might be possible, but not sure how.

I use a script that creates boilerplate drupal module.

I created a folder inside the "modules" folder to store this code, but if the generated code has any issue, my site stops working since Drupal tries to read this code and consider this as a real module.

I placed this folder in a different directory, and that solved the problem, but having it inside the modules folder itself would be more logical and easy to maintain.

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

Pages

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