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

'xyz' is not a supported key on custom text filter

I try to port a module that i want to publish, to Drupal 11. 

There have been some changes to the API and i cant get it to work at all. It must be some small detail in namin of something.

I still get:

  • 'elif_nofollow' is not a supported key.
  • 'elif_noopener' is not a supported key.
  • 'elif_noreferrer' is not a supported key.

I have a custom text filter like this:

How to test security of custom module?

What are the best ways to audit and review a custom module (or a contrib module) to ensure it is secure, or at least follows best practices?

How can I add a link appear in /admin for a specific role

Hello

I try to add a link appear in /admin for a specific role. This specific role has a few permissions (adding specific content for example) and I would like to hide certain links appear in /admin and to add other links in this same page.

I tried to use the hook MYMODULE_page_attachments_alter but I did not find the way to add links into this.

What solution for this ?

Thanks

Extending the Better Exposed Filters module to support a JSON field

What are the steps to follow to add new exposed filter widget for a JSON field added using the Views JSON Source module?

Tutorial: PHP Enumerations and Drupal List Fields

Overview

PHP 8.1 introduced a new data model, Enumerations. Enumerations allow for the creation of custom data models that can only contain a fixed set of allowed values. These enumerations can be very useful when working with Drupal list fields, which are a field type that allows for selection from a predefined set of values. As both enumerations and list field contain a predefined set of values, using Enumerations to back Drupal list field makes for more stable code that is easier to understand, and less likely to fail. 

Can't filter views according to user roles

I'm developing a Drupal 10 website with the DXPR Builder default theme and have two views that combine Flex Slider with the content events module to display events. My goal is to:

1. Display the first slider for both anonymous users and logged-in users.

2. Display the second slider only for logged-in users who have specific roles (e.g., admin, manager, content creator).

I've attempted to achieve this using Contextual Filters, but I haven't been able to get it to work as expected.

Pages

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