Drupal 10 compatibility - calling deprecated functions - file_create_url(), file_url_transform_relative(), file_save_data().

Created on 1 October 2023, about 1 year ago
Updated 15 October 2023, about 1 year ago

The latest 8.x.-1.24 version of EU cookie law module stated as Drupal 10 compatible but Drupal 10 upgrade status module warns multiple errors so probably these calls should be replaced:

Call to deprecated function file_create_url().
Call to deprecated function file_url_transform_relative().
Call to deprecated function file_save_data().

please find attached screenshoot.

📌 Task
Status

Closed: works as designed

Version

1.24

Component

Code

Created by

🇭🇺Hungary kepesv

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

Comments & Activities

  • Issue created by @kepesv
  • Assigned to bobi-mel
  • Issue was unassigned.
  • Status changed to Needs review about 1 year ago
  • 🇮🇳India sarwan_verma

    Hi @kepesv

    I have fixed this issue Drupal 10 compatibility - calling deprecated functions - file_create_url(), file_url_transform_relative(), file_save_data()
    and also attached patch,
    please review and verify.

  • 🇦🇹Austria agoradesign

    Are you a real dev or a bot? If dev, have you even read your own patch and the underlying code? There's only one helpful change in your proposed patch

  • Status changed to Closed: works as designed about 1 year ago
  • 🇳🇴Norway svenryen

    @sarwan_verma, I tried applying your patch to websites running Drupal 8 through 10.

    I only applied the one change that was relevant, since you've patched 3 cases where there's a check for the proper Drupal version. We like to support D8 through 10 with a single code base.

    When I patched the line where you added acessCheck(TRUE), the site wouldn't load. There's no method Drupal\Core\Config\Entity\Query\Query::acessCheck()

    Did you actually try running the code before you submitted your patch?

    I'm closing this one, since unfortunately I don't see any need for the patch. Feel free to reopen if you disagree.

Production build 0.71.5 2024