Need to ensure that the AddtoAny module is fully compatible with Drupal 11.
Currently, the module is locked to version 2.0.5, which supports Drupal 9 and 10.
As Drupal 11 has been released, it's crucial to confirm that the module functions correctly with the latest core changes.

Steps to Reproduce:

  1. Install the AddtoAny module on a site running Drupal 10.x.
  2. Attempt to upgrade the site to Drupal 11.
  3. Observe any errors or incompatibility warnings during the update process.

Expected Outcome:
The module should install and work without errors or deprecations in Drupal 11.

CommentFileSizeAuthor
#10 AddToAnySettingsForm.txt12.85 KBrshekhar
#9 addtoany-d11-logs.txt456 bytesreweb

Issue fork addtoany-3482074

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

nick.murza created an issue. See original summary.

nick.murza’s picture

Title: Ensure Drupal 11 Compatibility for AddtoAny Module » Drupal 11 Compatibility
bgogoi’s picture

not ready

dieppon made their first commit to this issue’s fork.

dieppon’s picture

I have solved the issues that 'Upgrade status' points out.

  • remove twig deprecatred function 'spaceless' (13 minutes ago)
  • Use renderInIsolation() instead of renderPlain()

kthull’s picture

This still needs the info.yml core version update.

dieppon’s picture

reweb’s picture

FileSize
456 bytes

Not working on a fresh drupal 11 install.

I've attached the logs.

rshekhar’s picture

FileSize
12.85 KB

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')
    );
  }
shivam_tiwari’s picture

Assigned: Unassigned » shivam_tiwari
micropat’s picture

Priority: Major » Normal
Status: Needs work » Fixed

Fixed in the latest release.

shivam_tiwari’s picture

Assigned: shivam_tiwari » Unassigned

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.