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.
| Comment | File | Size | Author |
|---|---|---|---|
| #2 | 1.patch | 1.13 KB | rishabh vishwakarma |
| node_export_error.png | 23.35 KB | rishabh vishwakarma |
Issue fork node_export-3332262
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
Comment #2
rishabh vishwakarma commentedThe 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.
Comment #3
rishabh vishwakarma commentedComment #5
abhinavk commentedI 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.
Comment #6
i-trokhanenko+1 RTBC
The patch #2 works for me
Comment #7
sleitner commented@i-trokhanenko, @danielb, @cgmonroe, @chia, @gaurav.kapoor, @James Andres please get a D10 version released.
Comment #9
i-trokhanenkoCommitted. Thanks!