New media not being created in public folders

Created on 1 September 2023, 10 months ago
Updated 2 September 2023, 10 months ago

Problem/Motivation

When I export content with media, the import does succeed, however, nodes that use the media imported result in errors on the page of it not being found. Looking at the folders, it's placing the media in the /tmp folders instead of our usual web/sites/default/files folder. Reverting back to beta2 results in expected results of the files being present and accessible from the nodes.

Steps to reproduce

* Install beta4 of single_content_sync
* Perform an export with media included
* Spin up a new instance without the content
* Install beta4 of single_content_sync
* Import the content zip you received from the original
* Attempt to visit a node that was created that used media that was imported

On the file system
* Visit /tmp and see the media directories and files residing there
* Visit web/sites/default/files and note that those directories and files are not present in this location

Proposed resolution

My initial thought was to either change the default location to save the files to, or check for the existence of the files and copy/move if they don't exist from the /tmp folder. I attempted a patch and it does seem to work specifically for our case so far--it checks for the existence of the files already and if not present, copies them. Tested with Drupal 9.5.

Remaining tasks

* Figure out why it is no longer saving to the correct location from beta2 to beta4

User interface changes

None

API changes

None

Data model changes

None

πŸ› Bug report
Status

Fixed

Version

1.4

Component

Code

Created by

πŸ‡ΊπŸ‡ΈUnited States dblanken

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.69.0 2024