Problem/Motivation

#2492171: Provide options to sanitize filenames (transliterate, lowercase, replace whitespace, etc) is blocked on #3032390: Add an event to sanitize filenames during upload which is itself languishing.

People are re-rolling older versions of #2492171 and confusing things in the parent issue.

Proposed resolution

Post "composer-friendly" re-rolls here, so as not to further confuse the parent issue.

Remaining tasks

-

User interface changes

-

API changes

-

Data model changes

-

Release notes snippet

-

Comments

dww created an issue. See original summary.

nlisgo’s picture

Status: Active » Needs review
StatusFileSize
new9.95 KB
nlisgo’s picture

@dww apologies for posting the patch in the parent issue. I was rushing trying to get my site onto Drupal 8.8 and trying to be a good citizen and post the patch. This is a good compromise. Thanks for setting up this child issue.

dww’s picture

No worries. Apologies for slightly losing my temper. The parent issue has been quite a frustrating journey. Glad you agree this child issue is a good compromise.

Cheers,
-Derek

Version: 8.8.x-dev » 8.9.x-dev

Drupal 8.8.7 was released on June 3, 2020 and is the final full bugfix release for the Drupal 8.8.x series. Drupal 8.8.x will not receive any further development aside from security fixes. Sites should prepare to update to Drupal 8.9.0 or Drupal 9.0.0 for ongoing support.

Bug reports should be targeted against the 8.9.x-dev branch from now on, and new development or disruptive changes should be targeted against the 9.1.x-dev branch. For more information see the Drupal 8 and 9 minor version schedule and the Allowed changes during the Drupal 8 and 9 release cycles.

pavelculacov’s picture

Make this patch for D9?

gbeezus’s picture

Attempted reroll. There was a merge conflict in the file.module right around line 1034.

Status: Needs review » Needs work

The last submitted patch, 7: 3094052-composer-patch-filename-sanitation-7.patch, failed testing. View results

nlisgo’s picture

Status: Needs work » Needs review
StatusFileSize
new9.61 KB

Thanks @gbeezus for the re-roll. The number of failed tests made me concerned so I decided to take another pass at it. Hopefully this will work.

nlisgo’s picture

@Regnoy I will work on a patch for D9 tomorrow if I get a chance.

pavelculacov’s picture

@nlisgo some changes?

shaunlaws’s picture

StatusFileSize
new9.67 KB

I had a crack at rerolling https://www.drupal.org/files/issues/2020-11-19/3094052-9.patch for Drupal 9. The attached patch applied successfully against Drupal 9.1.8 but I couldn't get the tests to pass locally. With the 'Enable filename transliteration' option checked on the file system admin page I got the following transliterations:

'TEXT-Å“.txt' uploaded as 'text-afaeuacaa.txt' (tests expected 'text-a.aeuoe.txt'
'S Pace--🙈.txt' -> 's-pace-afadega.aacaeuzacaaeu-.txt' (tests expected 's-pace-adegaace.txt')

I ran out of time to work more on it, but hopefully the patch is a useful start for someone to figure out why the tests fail.

ganesh_kumar’s picture

Hi ShaunLaws

This patch getting failed during upgrade of drupal 8 to latest release
drupal 9 #3094052-12.patch. and getting the below error refer failed patch one while during update the composer.

Could you please update the patch of supporting the D9 as well to sort out this issue.

Failed Patch
Could not apply patch! Skipping. The error was: Cannot apply patch https://www.drupal.org/files/issues/2021-05-12/3094052-12.patch

hkirsman’s picture

StatusFileSize
new8.74 KB
new7.49 KB

Re-rolling patch against 9.2.10

Version: 8.9.x-dev » 9.2.x-dev

Drupal 8 is end-of-life as of November 17, 2021. There will not be further changes made to Drupal 8. Bugfixes are now made to the 9.3.x and higher branches only. For more information see the Drupal core minor version schedule and the Allowed changes during the Drupal core release cycle.

Version: 9.2.x-dev » 9.3.x-dev
andypost’s picture

Version: 9.3.x-dev » 10.0.x-dev
smustgrave’s picture

dww’s picture

Status: Postponed » Closed (outdated)

The main feature is now in, so this issue doesn't need to remain open. 🎉