3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

------ ----------------------------------------------------------------------
Line text_resize.module
------ ----------------------------------------------------------------------
16 Call to deprecated method url() of class Drupal:
as of Drupal 8.0.x, will be removed before Drupal 9.0.0.
Instead create a \Drupal\Core\Url object directly, for example using
Url::fromRoute().
------ ----------------------------------------------------------------------

[ERROR] Found 1 error

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:

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

joy29 created an issue. See original summary.

joy29’s picture

FileSize
2.13 KB

Drupal 9 compatibility patch

joy29’s picture

Assigned: joy29 » Unassigned
Status: Active » Needs review
Kristen Pol’s picture

Issue tags: +Drupal 9 compatibility

Per a Slack discussion with Gábor Hojtsy regarding usage of D9 tags (Drupal 9, Drupal 9 compatibility, Drupal 9 readiness, etc.), "Drupal 9 compatibility" should be used for contributed projects that need updating and "Drupal 9" was the old tag for D8 issues before the D9 branch was ready. Doing tag cleanup here based on that discussion.

tostinni’s picture

Issue tags: -deprecated +Drupal 9 porting weekend
FileSize
3.09 KB

Here is an updated patch that also fixes the incorrect route declaration from help text.

pradeepjha’s picture

FileSize
35.49 KB

I've applied the patch. And tested in upgrade status module. No errors/warning found.
Also there is change in deprecated method url(). Block link on help page also tested. That's also working fine. Please find attached screenshot for help block link section.

We can move it to RTBC.

smrutha’s picture

Patch #5 works.

drupal-check -d web/modules/contrib/text_resize
3/3 [▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓▓] 100%

[OK] No errors

smrutha’s picture

Status: Needs review » Reviewed & tested by the community
m.mccool’s picture

Just brought Drupal up to 8.9.3 and preparing for Drupal 9 and I noticed Text_resize has stopped working. Loads fine and displays on screen but clicking on the icons has no effect.
I have applied patch 'text_resize-D9_compatibility-3073768-5.patch' but still not working.

devKhairul’s picture

@tostinni @smrutha

Running on Drupal 8.9.16

1) Tried to apply the patch by downloading the file to the module's folder and used 'git apply -v patch_name.patch'. Patch failed with the following error messages -

error: patch failed: text_resize.info.yml:1
error: text_resize.info.yml: patch does not apply
Checking patch text_resize.module...
warning: text_resize.module has type 100644, expected 100755
error: while searching for:
 */

use Drupal\Core\Routing\RouteMatchInterface;

/**
 * Implements hook_help().

error: patch failed: text_resize.module:6
error: text_resize.module: patch does not apply

2) Tried to add the patch to composer.json file (on project's root) and ran 'composer update drupal/text_resize'. Patch failed with the following error message.

Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2020-05-25/text_resize-D9_compatibility-3073768-5.patch

This is the only module preventing me from upgrading to Drupal 9. Any help would be greatly appreciated. Thanks!

emptyvoid’s picture

When creating a rector patch should it be based on the root of the drupal install or in the directory of the module?
I generated a patch based on the root of the build.

emptyvoid’s picture

rebuilt patch at root of module.

devKhairul’s picture

@emptyvoid

Hi, does this patch make the module compatible with Drupal 9.x? Thank you!

emptyvoid’s picture

While I have an updated patch which cleans up the info.yaml and module file. The Javascript file needs to be rewritten to properly reference the new data structures within the Drupal classes in browser.

The text_resize.js needs to be rewritten.

devkinetic’s picture

devkinetic’s picture

I was able to get this rolling in D9 with the following in my composr.json:

"repositories": {
        "0": {
                "type": "composer",
                "url": "https://packages.drupal.org/8",
                "exclude": [
                        "drupal/text_resize"
                ]
        },
        "text_resize-3073768": {
                "type": "git",
                "url": "https://git.drupalcode.org/issue/text_resize-3073768.git"
        }
"require": {
        drupal/text_resize": "dev-3073768-drupal-9-deprecated"
}
"patches": {
        "drupal/text_resize": {
                "Issue #3155864: $.cookie is not a function": "https://www.drupal.org/files/issues/2020-06-30/cookie_is_not_a_function_combined_patch-3155864-003.patch"
        }
}

Wongjn’s picture

Giving credit for duplicate issue #3149039: Automated Drupal 9 compatibility fixes

  • Wongjn committed 55a6ccb on 8.x-1.x authored by emptyvoid
    Issue #3073768 by devkinetic, emptyvoid, joy29, tostinni, pradeepjha,...
Wongjn’s picture

Status: Reviewed & tested by the community » Fixed
xaa’s picture

Wonderful ! thank you Wongjn

Status: Fixed » Closed (fixed)

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