Deleting the css folder while import CSV had to recreate it twice

Created on 4 September 2023, 10 months ago

Problem/Motivation

Dev version of a contentimport module that something is deleting the css folder and they had to recreate it twice.

Timeline:

* 13:33:09 UTC created the css folder

* 13:33:30 Drupal user/1 did a POST /admin/config/content/contentimport which kicked off a batch process.

* 13:33:48 the above batch process finished.

* 13:34:26 Checked for the css folder... it was not there

* 13:34:30 Re-created the css folder.

/var/www/html/xxx/docroot/sites/default/files$ ls -l css
ls: cannot access 'css': No such file or directory

Steps to reproduce

Step 1: Import CSV file
Step 2: Obaserve after finishing the CSV file import, site will break due to css folder gone.
Step 3: Some times getting site temporarily unavailable message while importing csv data and import is failling.

Proposed resolution

I think we could attempt to edit the contrib module to save the temporary file into the shared file system by replacing FALSE with your /shared/tmp folder:

$this->file = file_save_upload('file_upload', $form['file_upload']['#upload_validators'], FALSE, 0);

Note: facing this issue in Drupal 10 version.

Remaining tasks

It's important to show error message if import is failed and no data saved in the drupal rather showing success message.

User interface changes

API changes

Data model changes

🐛 Bug report
Status

Active

Version

9.0

Component

Module

Created by

🇮🇳India Parvateesam

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

Comments & Activities

Production build 0.69.0 2024