Problem/Motivation

Single node is not being exported when Node ID is being used. This is because the function file_save data has been removed from Drupal 10.

file_save_data($data, NodeExport::getFileUri($format), FileSystemInterface::EXISTS_REPLACE)

Steps to reproduce

admin->content->export

Proposed resolution

The function file_save_data() is not being called in the NodeExport.php file. It may have been deprecated in D10 or may have been replaced with another function. Should look for an alternative function/class and replace the deprecated function.

Command icon Show commands

Start within a Git clone of the project using the version control instructions.

Or, if you do not have SSH keys set up on git.drupalcode.org:

Comments

RISHABH VISHWAKARMA created an issue. See original summary.

rishabh vishwakarma’s picture

StatusFileSize
new1.13 KB

The function is replaced with the function writeData() which lies under the service file.repository. Check the documentation
https://api.drupal.org/api/drupal/core%21modules%21file%21file.services....

Attaching the patch with the modified function.

Works now.

rishabh vishwakarma’s picture

Status: Active » Needs review

DienUkr made their first commit to this issue’s fork.

abhinavk’s picture

Status: Needs review » Reviewed & tested by the community

I have tested Patch #2 in drupal 9 and drupal 10.0.8 and php 8.1. This patch makes module D10 compatible and functionality is working as expected.

Moving to RTBC.

i-trokhanenko’s picture

+1 RTBC
The patch #2 works for me

sleitner’s picture

@i-trokhanenko, @danielb, @cgmonroe, @chia, @gaurav.kapoor, @James Andres please get a D10 version released.

i-trokhanenko’s picture

Status: Reviewed & tested by the community » Fixed

Committed. Thanks!

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.