Problem/Motivation
When trying to edit a page on a Drupal 10 website with the CDN module installed, I received the following error:
Uncaught PHP Exception Error: "Call to undefined function file_url_transform_relative()" at /code/web/modules/contrib/cdn/cdn.module line 53
The file_url_transform_relative() function was deprecated and removed from Drupal 10:
https://www.drupal.org/node/2940031
Steps to reproduce
Attempt to add or edit content page.
Proposed resolution
Use a method from the file_url_generator service, as described in the issue linked above.
Comments
Comment #2
shiv_yadavComment #4
shiv_yadavHello kfolsom, i have create MR.
please review & retest it.
Thanks.
Comment #5
kfolsom commentedHi, @shiv_yadav,
I've tested your code change and it works as expected now. Thanks much.
Let me know if you need any more info on this.
Keith
Comment #6
lordzik commentedThat patch worked for me too.
Comment #7
dburiak commentedThe MR works for me. Added a patch with the changes above to simplify using with composer.
Comment #9
dburiak commentedComment #10
dburiak commentedComment #12
dburiak commentedComment #13
wim leersImproving the automated testing of this module by switching to GitLab CI in #3401760: Adopt GitLab CI: PHPStan compliance + test against 9.5/10.0/10.1/10.2/11.x + max PHP version. That will either prove or disprove the need for this change irrefutably 😊👍
Comment #14
wim leersRebased on top of #3401760: Adopt GitLab CI: PHPStan compliance + test against 9.5/10.0/10.1/10.2/11.x + max PHP version. This should make the PHPStan job pass 🤞
Comment #15
wim leersPHPStan is all green now! 🤩
Sorry everyone for the long delay on this. It's been a hectic year 🫣
Comment #16
wim leers