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

"Missing Dependencies" error in Drupal Module

Hello Everyone,

Hope you all are doing well !!

I am a fresher here to Drupal, and my problem statement is as follows:
There is an existing Drupal code (.info and .module files only in repo), which needs to be promoted to Drupal9 which will contain .info.yml file, I have tried to manipulate existing one, but it throws error saying "Missing 'application'" which is added in my dependencies in .yml file. I am attaching screenshots for reference and looking forward for some dedicated support please to fix this error.

How to pass JS variables to the server (for .php files in my module)

Hello,

I am currently trying to build a simple module that calls a Javascript function to ask for a users location data, (lat and long). Then take those two variables and send it back to a function inside of my moduleservice.php file. What would be the best way of doing this, or is my approach improper?

Thanks

How can you access Breadcrumb Links without doing it in a preprocess?

Hi Everyone,

I am trying to access all the links in the Breadcrumb outside the preprocess function. Seen many posts and examples regarding removing or adding them in a service. So far nothing that helps in getting only the links. Anyone have a suggestion?

How to save HTML tags in custom form using Rich text editor

Hello Team,

I am trying to create a custom form with format "basic_html". With this I can see Rich Text editor. When i am trying to get the HTML tags in form submit i can get only text . 

  $form['body'] = [
      '#type' => 'text_format',
      '#format' => 'basic_html',
      '#allowed_formats' => ['basic_html'], 
      '#required' => TRUE,
      ];
 
In form Submit :

    $body = $form_state->getValue('body')['value'];

$body does not return HTML tags from editor

Please help me with this issue.

Adding menu links by using hooks

Hello,
I tried to set links to the user (front)-page using this code in the module the "custom_simple_menu.module" file in my module structure. Uunfortunatelly no link appears. 
What do I have to change in the code?
Thank you
Peter Winkels

 

<?php

/**
 * @file
 * Contains custom simple menu module.
 */

/**
 * Implements hook_menu_links_discovered_alter().
 */
function custom_simple_menu_menu_links_discovered_alter(&$links) {

Showing Status Report for a user with custom rights

Hi, 

I am trying to show the Status Report to a user with custom rights. I can see the admin/reports/status page for the user I want to set the rights too. 

Controller:

Pages

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