New answers tagged

0

Add this to the relevant config file(s) in config/install: dependencies: enforced: module: - custom_module That will force the config item(s) to be removed when the module is uninstalled.


0

I'm already using Config Split for this site, so as a workaround I've added the problematic dependent config to the various split directories. This seems to have done the trick, but still curious if there are any other methods available.


0

A few things you can try: Make sure that when you are editing or creating new content that the "Text Format" selection box at the bottom of the WYSIWYG editor shows the same profile that you edited. On my site an advanced user can be allowed to choose from Filtered or Full HTML, and by default the Filtered HTML profile is loaded (thus they wouldn't ...


0

Read you comments on my other answer. Here's how I would start tackling in your situation. I think you're going down a Form Alter method. Start off simple. Create a new module with just an .info and .module. In the .module, add code to find what you're looking for. KSM will show you the array and you can dig in. /** * Implements form_alter(). * form_id ...


0

We found the solution using the sample found on How To Create A Custom Token In Drupal 8? Code /** * Implements hook_token_info(). */ function my_module_token_token_info() { $info = []; $info['types']['my_token_group'] = ['name' => t('Custom Group'), 'description' => t('Custom Group')]; $info['tokens']['my_token_group’][‘my_token’][] = 'A ...


1

Please see: https://www.drupal.org/project/drupal/issues/2247257 The uuid under the effects array is used as a "unique ID" for the effect. Seems technically it "works as designed", but as you can see from the linked project task, there is talk about if it's designed correctly. Fortunately, the uuid under the effects array is scoped to that effects ...


0

A config entity is useful when there need to be multiple variations of the configuration, think views, image styles, or node bundles. If there is no need to create variations, as in system.site which stores the site's basic information or core.extensions which stores the list of enabled modules, a basic config entry is appropriate.


2

Found, it can be done by using config.typed service: $typed_config_manager = \Drupal::service('config.typed'); $node_type_definition = $typed_config_manager->getDefinition('node.type.*');


0

Have you checked the $config_directories array in the settings.php/settings.local.php files. It might be a good idea to explicitly set it via config as per https://www.drupal.org/docs/8/configuration-management/changing-the-storage-location-of-the-sync-directory: $config_directories[CONFIG_SYNC_DIRECTORY] = '../config/sync';


0

Don't re-invent the wheel if these will solve your needs and hopefully wants. https://www.drupal.org/project/password_policy also worth looking into https://www.drupal.org/project/password_strength If those don't work, I think you're looking at a form alter related to validation. Drupal 8 is the wonderful world of Form Alters... so look into those even if ...


0

You can update custom config with a settings form you build. In a custom module custom_mailing add a file called custom_mailing.routing.yml add the following route: custom_mailing.route_admin_settings: path: '/admin/config/mailing' defaults: _title: 'Custom mailing' _form: '\Drupal\custom_mailing\Form\AdminSettingsForm' requirements: ...


2

A module install should not update config. If you want to update existing config, your module should implement hook_update_N() (see docs) instead. However, you could add a dependencies: enforced section to your YML config files. This will remove your existing config on module uninstall, and install the newest config on module reinstall. This way you can "...


Top 50 recent answers are included