Drupal 10 compatibility for 1.x version

Created on 16 June 2022, over 2 years ago
Updated 12 October 2023, about 1 year ago

Problem/Motivation

Hello project maintainers,

This is an automated issue to help make this module compatible with Drupal 10.

To read more about this effort by the Drupal Association, please read: The project update bot is being refreshed to support Drupal 10 readiness of contributed projects

Patches will periodically be added to this issue that remove Drupal 10 deprecated API uses. To stop further patches from being posted, change the status to anything other than Active, Needs review, Needs work or Reviewed and tested by the community. Alternatively, you can remove the "ProjectUpdateBotD10" tag from the issue to stop the bot from posting updates.

The patches will be posted by the Project Update Bot official user account. This account will not receive any issue credit contributions for itself or any company.

Proposed resolution

You have a few options for how to use this issue:

  1. Accept automated patches until this issue is closed

    If this issue is left open (status of Active, Needs review, Needs work or Reviewed and tested by the community) and the "ProjectUpdateBotD10" tag is left on this issue, new patches will be posted periodically if new deprecation fixes are needed.

    As the Drupal Rector project improves and is able to fix more deprecated API uses, the patches posted here will cover more of the deprecated API uses in the module.

    Patches and/or merge requests posted by others are ignored by the bot, and general human interactions in the issue do not stop the bot from posting updates, so feel free to use this issue to refine bot patches. The bot will still post new patches then if there is a change in the new generated patch compared to the patch that the bot posted last. Those changes are then up to humans to integrate.

  2. Leave open but stop new automated patches.

    If you want to use this issue as a starting point to remove deprecated API uses but then don't want new automated patches, remove the "ProjectUpdateBotD10" tag from the issue and use it like any other issue (the status does not matter then). If you want to receive automated patches again, add back the "ProjectUpdateBotD10" tag.

  3. Close it and don't use it

    If the maintainers of this project don't find this issue useful, they can close this issue (any status besides Active, Needs review, Needs work and Reviewed and tested by the community) and no more automated patches will be posted here.

    If the issue is reopened, then new automated patches will be posted.

    If you are using another issue(s) to work on Drupal 10 compatibility it would be very useful to other contributors to add those issues as "Related issues" when closing this issue.

Remaining tasks

Using the patches

  1. Apply the latest patch in the comments by Project Update Bot or human contributors that made it better.
  2. Thoroughly test the patch. These patches are automatically generated so they haven't been tested manually or automatically.
  3. Provide feedback about how the testing went. If you can improve the patch, post an updated patch here.

Providing feedback

If there are problems with one of the patches posted by the Project Update Bot , such as it does not correctly replace a deprecation, you can file an issue in the Drupal Rector issue queue . For other issues with the bot, for instance if the issue summary created by the bot is unclear, use the Project analysis issue queue .

📌 Task
Status

Fixed

Version

1.0

Component

Code

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

  • First commit to issue fork.
  • Status changed to Needs work almost 2 years ago
  • 🇮🇳India rckstr_rohan

    Patch looks good but need to remove depreciated function too. please refer the the article and replace all the decpreciated functions, https://api.drupal.org/api/drupal/deprecated/9.3.x?type=&deprecated_textfilter=&order=reference_count&sort=desc

  • Assigned to shivam_tiwari
  • @shivam_tiwari opened merge request.
  • 🇮🇳India shivam_tiwari

    Please check, I created merge request for branch 8.x-1.x. Checked by Drupal upgrade status, there is no depreciated function at now.

  • Issue was unassigned.
  • Status changed to Needs review over 1 year ago
  • 🇮🇳India ajeet_kumar gurugaon

    Drupal 10 compatibility 8.x-2.0-alpha5 version released.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    run-tests.sh fatal error
  • 🇫🇮Finland miikamakarainen

    Are there any plans on updating the 8.x-1.0-version to be Drupal 10-compatible and what is the future for the 1.0-branch?

    The issue I have with updating to 8.x-2.0 is that it is using the menu_link-field module. I haven't any documentation for migrating the menu items from menu_ui to menu_link-fields.

    If you have an existing site the issue becomes that the menu links created via menu_ui are not shown to the end user, presenting them with an empty menu item field. To the user it seems that the page does not have a menu link item attached to it and it may lead to a user adding a duplicate menu entry to the same content.

    There is also no way of updating/removing the old menu item without navigating to "Admin - Structure - Menu - Manage" which is in my case a hurdle as we have large menus and finding correct items in the structure is complicated without the ability to do so in the "edit node"-form.

  • First commit to issue fork.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • Status changed to Needs work over 1 year ago
  • 🇯🇵Japan ultrabob Japan

    I've applied all the rector patches in the Merge request so far, but it doesn't appear that that is enough to get the module D10 ready. It appears there must be a change in the way the menu link is handled in Drupal 10. If a maintainer is here and can shed light on their plans for the module it would help to determine whether it would be time well spent to try and get the module going on Drupal 10 or not.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 8.1 & MySQL 5.7
    last update over 1 year ago
    run-tests.sh fatal error
  • 🇺🇸United States chrissnyder Maryland

    Are there any plans on updating the 8.x-1.0-version to be Drupal 10-compatible and what is the future for the 1.0-branch?

    I have the exact same need/question. I would like to use the 1.0 version on D10.

  • 🇯🇵Japan ultrabob Japan

    I spent a good chunk of time digging in and trying to figure out why this module is not working, and I didn't come out of it with an answer for how to make it work, I can see what is going on in this module that isn't working.

    In menu_link_weight.node.inc\menu_link_weight_form_node_form_alter The code checks whether $form['menu']['link'] is set. $form['menu'] itself never exists, so the alter never runs. There is a hook in core menu_ui.module: menu_ui_form_node_form_alter that should be setting that up, but that alter is never run. The menu part of the form appears to be being handled somewhere else in Drupal 10.

    I tried searching for change records that might highlight what has changed but came up empty there too.

  • Status changed to Needs review over 1 year ago
  • 🇯🇵Japan ultrabob Japan

    I'm sorry. I was testing on an install that wasn't fresh. Specifically, it had the menu_link module installed. The menu_link module disrupts how the menu_link is added to the form and causes this module not to work.

    This seems less than ideal because the similarity of the module names may lead some to believe that this is a module in the menu_link ecosystem when in fact, installing menu_link will break this module. I'll try to do a bit more in-depth research into this, and open a separate ticket. For now though, on a clean install, the module does seem to work on Drupal 10.

    I hope someone can review it.

  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    2 pass, 2 fail
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • 🇺🇸United States chrissnyder Maryland

    The current state of the open merge requests don't fully provide D10 compatibility. So I am attaching a patch instead.

    I have attached a patch that provides D10 compatibility for the 1.0 version (8.x-1.0) of this module.

    Ahead of a new 8.x-1.x release of this module, you can apply this patch using composer-drupal-lenient to allow you to upgrade to Drupal 10.

  • 🇺🇸United States chrissnyder Maryland
  • Open in Jenkins → Open on Drupal.org →
    Core: 9.5.x + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    3 pass
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.5 + Environment: PHP 8.1 & MariaDB 10.3.22
    last update over 1 year ago
    Composer require failure
  • 🇺🇸United States chrissnyder Maryland
  • Status changed to RTBC over 1 year ago
  • 🇺🇸United States chrissnyder Maryland
  • 🇺🇸United States chrissnyder Maryland
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • @ultrabob opened merge request.
  • Open in Jenkins → Open on Drupal.org →
    Core: 10.0.7 + Environment: PHP 7.3 & MySQL 5.7
    last update over 1 year ago
    Composer error. Unable to continue.
  • 🇯🇵Japan ultrabob Japan

    Merge Request 7 now has the change to the .module file that @ChrisSnyder added in his patch. I have confirmed that the module continues to work on a D10 with the change applied, so I'll leave it marked RTBC

  • Status changed to Fixed over 1 year ago
  • 🇯🇵Japan ultrabob Japan

    Thanks everyone, I'll try to get this released shortly.

  • 🇩🇪Germany webflo

    Awesome! Thanks @ultrabob

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

  • Status changed to Fixed about 1 year ago
  • 🇧🇪Belgium cgoffin

    Found another place where there is a PHP deprecation message, see attached patch.

Production build 0.71.5 2024