๐Ÿ‡ฎ๐Ÿ‡ณIndia @rshekhar

Account created on 13 November 2024, 3 months ago
#

Recent comments

๐Ÿ‡ฎ๐Ÿ‡ณ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.

 

  1. 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'}
    1. 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)\"}"
    2. name: "AjaxError"
    3. 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"
    4. [[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
      1. constructor: ฦ’ (xmlhttp, uri, customMessage)
      2. 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"
      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')
    );
  }
Production build 0.71.5 2024