- Issue created by @sourojeetpaul
- Merge request !29Issue #3437946: Deprecated function modification. → (Open) created by sourojeetpaul
- Issue was unassigned.
- Status changed to Needs review
10 months ago 7:00pm 3 April 2024 Hello @Akansha Tyagi, I've tried to install your theme on a D10 instance and encountered an error on installation which seemed to be causing for using deprecated function on the .theme file.
drupal_get_path() is deprecated in Drupal:9.3.0 and also removed from Drupal:10.0.0. Use \Drupal::service('extension.list.theme')->getPath('theme_name') instead.I've raised an MR by solving the issue please have look:
https://git.drupalcode.org/project/school_theme/-/merge_requests/29- 🇮🇳India Kanchan Bhogade
Hi
I've tested MR !29 on Drupal 10 The
Patch applies successfully...Unexpected error issue resolved for site
RTBC+1Adding SS for references
Keeping in "needs Review" for code verification
- Status changed to RTBC
9 months ago 10:11pm 12 April 2024 - 🇮🇳India Rajan Kumar@2026
Rajan Kumar@2026 → changed the visibility of the branch 3437946-deprecated-function-modification to hidden.
- 🇮🇹Italy apaderno Brescia, 🇮🇹
@Rajan Why did you hide the MR which should fix the reported issue?
- 🇮🇹Italy apaderno Brescia, 🇮🇹
apaderno → changed the visibility of the branch 3437946-deprecated-function-modification to active.
- Status changed to Needs work
9 months ago 5:06pm 7 May 2024 - 🇮🇹Italy apaderno Brescia, 🇮🇹
It should be better to avoid using a
define()
-d constant, since calling a method from outside any function/method is probably a bad idea. - 🇮🇳India dev16.addweb
@apaderno, I have removed define and modified code, please review.
- Status changed to Needs review
9 months ago 5:40am 8 May 2024 - 🇮🇳India Rajan Kumar@2026
Hellow, @apaderno
I tested MR on local work fine for me.
- Status changed to Needs work
6 months ago 5:56am 2 August 2024 Hello,
I have followed the below steps and encountered this syntax error, added the ss for reference- Installed the theme
- Navigated to the settings page for the theme.
- Found the error for drupal_get_path() is undefined.
- Apply the merge which applied cleanly.
- Found the syntax error in the settings page for the theme.
Please have a look.
- Status changed to Needs review
6 months ago 6:06am 2 August 2024 Hi @Esha_Kundu,
Thanks for the finding. Missed that accidentally :)
Now resolved your comment, pls check once!- Status changed to RTBC
6 months ago 8:36am 2 August 2024 Hi
I've retested the MR!29 and the patch applied cleanly and the syntax error that I had encountered earlier mentioned in the comment #17 🐛 drupal_get_path() is deprecated in Drupal 9.3.0 and removed from Drupal 10.0.0 RTBC has been resolved now.
Please have a look also attached ss for reference.
Moving to RTBC.