- Issue created by @Harshita mehra
- Status changed to Needs review
over 1 year ago 1:32pm 13 June 2023 - 🇮🇳India Harshita mehra
I have uploaded a patch for the issue.
Please review.
Thanks! - Status changed to Closed: works as designed
over 1 year ago 10:58am 8 August 2023 - 🇮🇹Italy apaderno Brescia, 🇮🇹
if (((int) \Drupal::VERSION) < 9) { - if (file_prepare_directory($location, FILE_CREATE_DIRECTORY)) { + if (\Drupal::service('file_system')->prepareDirectory($location, FileSystemInterface::CREATE_DIRECTORY)) { $files = file_unmanaged_copy($droot . '/themes/moksu/content/' . $alias . '.html.twig', $location); $test = rename($droot . '/themes/moksu/templates/' . $alias . '.html.twig', $droot . '/themes/moksu/templates/page--node--' . $node->id() . '.html.twig'); }
Since that function is called only with Drupal 8 (See the
if (((int) \Drupal::VERSION) < 9) {
control statement that wraps those lines) that is fine.
Since the same branch aims to work with Drupal 8 and Drupal 9, that is the only possibility.