Questions tagged [plugins]

Use it for Drupal 8 plugins; for plugins implemented from the Views module use views, ctools for Chaos tool suite plugins.

Filter by
Sorted by
Tagged with
0 votes
0 answers
62 views

Does anyone have suggestions or recommendations on how to integrate CKEditor 5 Full page HTML plugin successfully into a Drupal website?

I am exploring ways to implement the Full Page HTML feature of CKEditor 5 in Drupal. Does anyone have suggestions or recommendations on how to integrate this feature successfully into a Drupal website?...
aiqntsrgulla's user avatar
0 votes
0 answers
50 views

Search api solr - index based on field rather than entity

I have a custom field that has 3 columns and I'm trying to create search page (search_api, solr and view based on search api index to display data) that will perform a search on this field (attached ...
roman's user avatar
  • 21
0 votes
1 answer
60 views

Why won't my fieldtype plugin save the settings form values?

I have a custom field. The FieldType plugin provides a settings form that adds a field to the form. The field is a group of checkboxes...think the paragraph types selection when adding a entity ...
JAyenGreen's user avatar
3 votes
1 answer
209 views

Is possible to have OR logic on block visibility?

I am on D10. I need to place several blocks on Block Layout having different visibility conditions: for example one of them should visible BOTH in the home page and in every article of the site. I'd ...
Giuseppe's user avatar
  • 939
0 votes
0 answers
61 views

Migrate file doesn't detect a custom process plugin

I'm working in a migration from a custom CMS to Drupal. In a first step I have migrate the paragraphs; now, I'm trying to migrate the nodes. All the fields are filled except the paragraph field. I ...
Oskar Calvo's user avatar
0 votes
0 answers
192 views

How create a custom views contextual filter?

I've a site using Drupal 10.1.x. I need to implement the following requisites: Let the users choose their "most liked" nodes (bundle product). This bundle has a entity reference field to ...
Giuseppe's user avatar
  • 939
1 vote
1 answer
629 views

How do you install or turn on CKEditor 5 paste from word plugin

According to a conversation with CKEditor this feature is included in the Drupal 10 version. They do not support it and point you to Documentation for paste from Word We cannot find where to turn ...
FolioGuru's user avatar
0 votes
1 answer
91 views

How to update migration field mapping using custom module/form?

I was learning about Drupal migration recently and found out that we can use Migrate Plus module to import migrations as configurations. Hence I started wondering if a migration is imported as a ...
SGupta's user avatar
  • 1
0 votes
1 answer
85 views

How to use node context in custom block plugin to get correct revision for node and its fields?

Background information for this question can be found here: How to have a different hero image per node? I have written a custom block that takes the data from this "hero" paragraph and ...
Jordan's user avatar
  • 49
-3 votes
1 answer
177 views

"Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException"

I get this exception, which does not say which plugin causes it. Uncaught PHP Exception Drupal\Component\Plugin\Exception\PluginNotFoundException The "" entity type does not exist. at /var/...
Oskar Calvo's user avatar
2 votes
1 answer
195 views

How to override a contrib module's FieldType plugin?

I'm trying to override a FieldType plugin provided by the Field Encrypt module: class EncryptedFieldStorageItem extends FieldItemBase { I created my own class, MyModuleEncryptedFieldStorageItem, and ...
Patrick Kenny's user avatar
2 votes
3 answers
512 views

Fatal error: concerning DrushStyle::warning not being compatible with SymfonyStyle::warning

I just upgraded our site from Drupal 9.5.9 to Drupal 10.1 (following instructions from here - https://www.drupal.org/docs/upgrading-drupal/upgrading-from-drupal-8-or-later/upgrading-a-composer-based-...
Mahesh Gudapakkam's user avatar
2 votes
1 answer
2k views

Drupal\Component\Plugin\Exception\PluginNotFoundException: The "node_type" plugin does not exist

I have upgraded drupal 9 to drupal 10 and now while creating a content page or editing the existing content page it is throwing error in error logs Drupal\Component\Plugin\Exception\...
Libbna Mathew's user avatar
1 vote
2 answers
286 views

Custom plugin definition not loading

I'm trying to create my own plugin type in Drupal 9 but it's not finding my test definition and I can't figure out why. Here's my services.yaml: services: plugin.manager.reaction: class: Drupal\...
Lambic's user avatar
  • 718
3 votes
1 answer
486 views

Removing phantom plugin from database

On several sites I've worked on, for whatever reason before I put my hands on it, the database seems to register a plugin that is no longer in config or code. This usually goes as follows: [error] ...
TripodC's user avatar
  • 41
0 votes
0 answers
26 views

Special sorting requirement in views for a multi-value field: how to avoid duplicated result items

This is another attempt to solve Custom views filter plugin: filter over two fields of a custom entity where one of the fields is a multi value field in a seperate table I have create a basefield (...
Tobias Krause's user avatar
1 vote
2 answers
128 views

Custom views filter plugin: filter over two fields of a custom entity where one of the fields is a multi value field in a seperate table

I have a custom entity with two basefields of type "list_string": "role" and "additional_role". I need this as "role" is used for sorting the entities by a very ...
Tobias Krause's user avatar
1 vote
0 answers
69 views

How is a ckeditor plugin form is discovered and loaded for the plugin? [closed]

I am trying to understand how Text filters settings form are used. For example, if you look at the url_embed module it has: src/Form/UrlEmbedDialog.php src/plugin/Filter/UrlEmbedFilter How does the ...
awm's user avatar
  • 2,459
2 votes
1 answer
232 views

CKEditor 5 - access PHP plugin configuration from JS plugin?

I have provided a CKEditor 5 plugin a PHP configuration class. I am able to set and store configuration for the text editor plugin now, but do not know how to access that configuration value(s) from ...
Kevin's user avatar
  • 27.8k
2 votes
1 answer
307 views

How to create configurable plugins under a plugin manager?

I have a custom plugin type and annotation. The purpose of it is so people can develop their own clients for an API integration, and tell the system which plugin to use to perform these actions. I am ...
Kevin's user avatar
  • 27.8k
0 votes
0 answers
50 views

interaction between form element plugins and config entity plugin collections

I'm making a form element plugin which has compound elements, but which should return a single string value. This is the same idea as core's password confirm form element (https://api.drupal.org/api/...
joachim's user avatar
  • 846
0 votes
1 answer
132 views

Prevent validation constraint from triggering when 'add more' button is clicked

I have a custom validation constraint plugin that prevents submission if an entity reference field has an odd number of values. The validation triggers upon submission just fine public function ...
Amy's user avatar
  • 5,680
0 votes
1 answer
103 views

How to check in a custom constraint validator whether a field allows for multiple values or not

In my custom validator plugin I want to be able to tell whether the field value given was part of a field that allowed for more than 1 value. For example public function validate($items, Constraint $...
Amy's user avatar
  • 5,680
-5 votes
1 answer
325 views

How do I execute PHP code in a view?

There are myriad applications to need to execute specific PHP functions in Views rows. In many cases, making a custom Plugin is a better option. In other cases, it's better to use a Twig or custom ...
TripodC's user avatar
  • 41
1 vote
1 answer
97 views

Create a Context/Condition and get a view display used on the page

I want to create a context/condition plugin that checks the total results returned from a view display on the page (its a block), and if its less/greater than a certain figure, hide certain peripheral ...
Kevin's user avatar
  • 27.8k
0 votes
1 answer
1k views

Migrate PHP version - The "" plugin does not exist

I'm using Drupal 9.3.11 on PHP 7.3. Site is running perfectly. I need upgrade to PHP 8, but I am getting this error. Drupal\Component\Plugin\Exception\PluginNotFoundException: The "" plugin ...
vctlzac's user avatar
  • 163
1 vote
1 answer
1k views

TypeError: Argument 1 passed to ........ ::__construct() must implement interface Drupal\Core\Cache\CacheBackendInterface, array given, called in

I'm getting an error when I wrote the code using Dependency injection: TypeError: Argument 1 passed to Drupal\sydneypro_exchange_rates_block\Plugin\Block\ExchangeRatesBlock::__construct() must ...
nathan111777's user avatar
0 votes
1 answer
69 views

How can I display user information along with its choices?

Usually, polls are anonymized. We need to process total votes, percentages... Now, in the context of Ukraine invasion, an institutional client wants to enhance an Advanced poll existing implementation,...
Kojo's user avatar
  • 3,523
-1 votes
2 answers
223 views

Dependency injection in create() method of block plugin with derivatives

I am trying to extend the menu_block module to allow it to work with domains (via the domain module). In order to do this I am extending the MenuBlock class, and trying to access the domain.negotiator ...
reekanmantell's user avatar
0 votes
0 answers
63 views

Why would a contributed module try to load one of its files from a custom directory?

I built a module on a local instance in my module/custom directory; I then published it on drupal.org, as Group by Field Widget. For some reason, when I install the release 1.1.1 via Composer, I get ...
J.Floyd's user avatar
  • 139
1 vote
1 answer
240 views

Use deriver in Drupal Migration yml

I am trying to use the deriver key in a migration yml to have dynamically build migrations for each bundle of an Entity Type (Drupal 9). I read this and I am trying to use the deriver key to point to ...
Stefan Korn's user avatar
  • 1,211
0 votes
1 answer
221 views

How to provide an array of values from a context provider

I'm looking into building a custom Context Provider, specifically to provide "groups of the current user". I'm building this for another plugin, a Condition plugin, whose purpose is to ...
Joseph's user avatar
  • 1,596
0 votes
1 answer
531 views

How to use sql MAX() function in views plugin query

I am creating a custom views filter for a custom views field. The following SQL will accomplish the filter I seek: select nid, moderation_state, content_entity_id, MAX(content_entity_revision_id) ...
SomebodySysop's user avatar
3 votes
1 answer
110 views

Custom field formatter fails in create()

PHPStorm, PHP 7.4 IDE highlights $container->get('date.formatter'), with "Expected parameter of type '\Drupal\Core\Datetime\DateFormatterInterface', 'object' provided" This function is ...
Scott's user avatar
  • 41
2 votes
2 answers
2k views

How to use migrate process plugin concat on multiple values?

I am trying to import from a csv that has multiple files in the same column, e.g. title,gallery,tag node1,img1.jpg|img2.jpg|img3.jpg,2 node2,img4.jpg,2 node3,img5.jpg|img6.jpg,3 I need to prepend the ...
jofitz's user avatar
  • 125
1 vote
0 answers
182 views

How do I override /libraries/ckeditor-wordcount-plugin/lang/some.js?

I'm using ckwordcount module which basically adds nice max length and counter features to text Fields, and relies on WordCount Plugin for CKEditor Editor. Most of the translations in the plugin lang ...
Kojo's user avatar
  • 3,523
2 votes
0 answers
358 views

The form argument Drupal\terminal\Form\TerminalCliForm is not a valid form

I've read through other questions regarding the same error message. They all seem to end up being due to typos or the file path. I don't believe that is the case here, but we'll see. I have a working ...
JAyenGreen's user avatar
1 vote
1 answer
196 views

Why custom condition is not containing parent entity?

I'm using: Drupal 9.1.7 Commerce 2.24 I'm trying to create my custom condition (based on https://docs.drupalcommerce.org/commerce2/developer-guide/core/conditions). However parent entity is always ...
Codium's user avatar
  • 4,955
1 vote
0 answers
1k views

How to filter entity_autocomplete results by content type and a field

I am trying to implement an entity autocomplete field in a form where the autocomplete entities are filtered by content type and a certain field of that content type. I know I can filter the ...
spacecraft96's user avatar
0 votes
1 answer
88 views

Purpose of "views_date_format_sql" module

i got back a projet which is using the module views_date_format_sql. This module is not compatible with D9, so I'm trying to find a replacement But I don't get what this module is supposed to do. If I ...
user avatar
0 votes
1 answer
90 views

Class Drupal\dfm\EventSubscriber\DfmSubscriber not found when try to remove the Drupella File Manager

I installed the Drupella File Manager module for Drupal 8.8, but I have Drupal 8.7. I received this error. Call to undefined method Drupal\Core\File\FileSystem::scanDirectory() I don't need the ...
user avatar
1 vote
0 answers
45 views

What is The Best Practice for Custom Plugin Files Placement

I'm going to create a custom plugin type, so I need to create a plugin manager, plugin base, plugin Interface and a plugin annotation, the annotations goes to ModuleRoot/src/Annotation but for the ...
Alireza Tabatabaeian's user avatar
0 votes
0 answers
315 views

Skip_on_empty row method working, but entity still created

I am migrating a field in a node to a paragraph. I am trying to only create the paragraphs where the field has values. That field is an entity reference to another node. source: plugin: d7_node ...
Adrained's user avatar
  • 319
2 votes
1 answer
595 views

How do I create a block in a module that can be referenced via an entity reference field?

I'd like to be able to reference my programmed block as a field in a paragraphs. I've Generated a module with drupal console - drupal generate:module Used the template for a block from the example ...
Interlated's user avatar
  • 1,413
-1 votes
1 answer
219 views

Can't get annotated plugin discovery to fire

I've checked Debug plugin discovery and tried restarting Apache and setting $settings['class_loader_auto_detect'] = FALSE; in settings.php, with no change. I have a custom module. Setting a breakpoint ...
JAyenGreen's user avatar
1 vote
1 answer
198 views

How to remove non breaking space from body/value in migration process?

I am successfully migrating the content from Drupal 7 to Drupal 9. However, I am getting some extra non-breaking spaces I'd like to remove. I tried using a basic str_replace plugin, but that doesn't ...
Joe Spinelli's user avatar
5 votes
2 answers
478 views

How can I let a plugin depend on another module?

Is it possible to let a plugin depend on a module (other than the declaring one)? Use case: I want to create a field widget plugin that should depend on the 'date_all_day' contrib module, but I don't ...
donquixote's user avatar
  • 3,642
0 votes
0 answers
158 views

How to delete taxonomy terms created with entity_generate process plugin?

I have this json. { "ProductKey": "145.1", "Product": { "Title": "Product title", "StartDate": null, ...
Ahmad's user avatar
  • 2,835
0 votes
1 answer
181 views

File structure of libraries folder and detection of module external plugins

The module CKeditor anchor link require a CKEditor plugin. Can this plugin be placed in subfolder of the /libraries folder or does it have imperatively to be placed at the root of /libraries ? More ...
Matoeil's user avatar
  • 3,429
1 vote
1 answer
137 views

How to create a view filter plugin to filter a column created by a view field plugin

I have created a view field plugin to display an "internal status" for each node in a view. Those status are not stored in a table (and should not) because each status may vary depending the ...
Baud's user avatar
  • 532

1
2 3 4 5