- Issue created by @arti_parmar
- ๐ฎ๐ณIndia Prachi6824
Hello,
If you are getting this error Call to undefined function file_create_url() in city_zymphonies_theme_get_slider_content() it can be resolved using \Drupal::service('file_url_generator')->generateAbsoluteString($uri) - Issue was unassigned.
- ๐ฎ๐ณIndia Shreya_98
Shreya_th โ made their first commit to this issueโs fork.
- @shreya_th opened merge request.
- Status changed to Needs review
about 1 year ago 12:46pm 13 September 2023 - ๐ฎ๐ณIndia Shreya_98
Hello @zymphonies-dev
Hope you are doing well,
Added the MR to Call to undefined function file_create_url().
Kindly review the changes.Thank you.
- ๐ฎ๐ณIndia sundaravigneshP
I have face some issues like this drupal_get_path().
Error: Call to undefined function drupal_get_path() in city_zymphonies_theme_get_slider_content() (line 126 of themes/contrib/city_zymphonies_theme/city_zymphonies_theme.theme).
After install city_zymphonies_theme & i have solution to fix this issue.
Please open the city_zymphonies_theme.theme file in the path of ( themes/contrib/city_zymphonies_theme/city_zymphonies_theme.theme )
In the line 126 they have mention the drupal_get_path function theme of city_zymphonies_theme. so please add the drupal_get_path() after end of this city_zymphonies_theme_get_slider_content function.Here is this drupal_get_path() :
function drupal_get_path($type, $name) {
/**
drupal_get_path('module', 'node') \Drupal::service('extension.list.module')->getPath('node')
drupal_get_path('theme', 'seven') \Drupal::service('extension.list.theme')->getPath('seven')
drupal_get_path('profile', 'standard') \Drupal::service('extension.list.profile')->getPath('standard')
*/
switch ($type) {
case 'module':
return \Drupal::service('extension.list.module')->getPath($name);
break;
case 'theme':
return \Drupal::service('extension.list.theme')->getPath($name);
break;
case 'profile':
return \Drupal::service('extension.list.profile')->getPath($name);
break;
return false;
}
}After add this drupal_get_path() function, drush cr & check.
- Status changed to Needs work
about 1 year ago 7:20pm 31 October 2023 - @rushikesh-raval opened merge request.
- Status changed to Needs review
about 1 year ago 5:55am 1 November 2023 - Status changed to Needs work
about 1 year ago 1:28pm 1 November 2023 - ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
Since the code is calling two functions that are not defined in the latest Drupal core releases, let's change both those function calls, as providing two different patches/MRs to separately fix the two issues is not possible.
- Status changed to Needs review
about 1 year ago 6:18am 2 November 2023 - ๐ฎ๐ณIndia rushiraval
I have fixed this issue in MR!6 . also fixed for FILE_STATUS_PERMANENT constant which is also removed.
I have change minimum required Drupal version to 9.3 and 10 because developed has mention it in description of theme.
- ๐ฎ๐นItaly apaderno Brescia, ๐ฎ๐น
FILE_STATUS_PERMANENT has been deprecated in Drupal 9.3.x too โ . The minimum required Drupal core version is correct.