๐ฎ๐ณIndia rshekhar
Thanks for your reply. it really solve my problem. Mentioning updated code here.
if (isset($definitions[(string) $plugin_id])) {
return $definitions[(string) $plugin_id];
}
Now i have issue with webform. my webform modules are showing deprecated in the admin panel. And when i try to add new element to it, it gives ajax error.
- Drupal.AjaxError {message: '\nAn AJAX HTTP error occurred.\nHTTP Result Code: 40โฆte name: \\u0022entity.webform_ui.element\\u0022)"}', name: 'AjaxError', stack: 'Error\n at http://fhm/core/misc/ajax.js?v=11.1.1โฆ at http://fhm/core/misc/ajax.js?v=11.1.1:1926:3'}
- message: "\nAn AJAX HTTP error occurred.\nHTTP Result Code: 404\nDebugging information follows.\nPath: /admin/structure/webform/manage/contacttest/element/add\nStatusText: Not Found\nResponseText: {\"message\":\"The \\u0022webform\\u0022 parameter was not converted for the path \\u0022\\/admin\\/structure\\/webform\\/manage\\/{webform}\\/element\\/add\\u0022 (route name: \\u0022entity.webform_ui.element\\u0022)\"}"
- name: "AjaxError"
- stack: "Error\n at http://fhm/core/misc/ajax.js?v=11.1.1:196:32\n at http://fhm/core/misc/ajax.js?v=11.1.1:1926:3"
- [[Prototype]]: Error at http://fhm/core/misc/ajax.js?v=11.1.1:196:32 at http://fhm/core/misc/ajax.js?v=11.1.1:1926:3
- constructor: ฦ (xmlhttp, uri, customMessage)
- stack: "Error\n at http://fhm/core/misc/ajax.js?v=11.1.1:196:32\n at http://fhm/core/misc/ajax.js?v=11.1.1:1926:3"
- [[Prototype]]: Object
๐ฎ๐ณIndia rshekhar
Modify these two functions and it will work for Druapl 11.
path to the file:- addtoany\src\Form\AddToAnySettingsForm.php
public function __construct(
ConfigFactoryInterface $config_factory,
TypedConfigManagerInterface $typed_config_manager,
ModuleHandlerInterface $module_handler,
ExtensionList $module_extension_list,
EntityTypeBundleInfoInterface $entity_type_bundle_info
) {
parent::__construct($config_factory, $typed_config_manager);
$this->moduleHandler = $module_handler;
$this->moduleExtensionList = $module_extension_list;
$this->entityTypeBundleInfo = $entity_type_bundle_info;
}
/**
* {@inheritdoc}
*/
public static function create(ContainerInterface $container)
{
return new static(
$container->get('config.factory'),
$container->get('config.typed'),
$container->get('module_handler'),
$container->get('extension.list.module'),
$container->get('entity_type.bundle.info')
);
}