Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Files needing to be cleaned that are inserted into the Body with the Insert module use the old, uncleaned path and file name.
Once the node is saved, it *should* update the link in the body that was created with the insert button, but this is not happening with my complicated file names.
Whatever regex expression does the updating of the links in the body area seems to miss files with spaces, dashes, etc.
It seems similar to the 2 issues below, which apparently were both committed.
The only way to work around this bug is to:
- add files to node
- save node
- edit node
- click file's Insert button
Comment | File | Size | Author |
---|---|---|---|
#2 | filefield_paths-fixes-links-encoding-2309159-2.patch | 1.1 KB | jlongbottom |
#1 | filefield_paths-fixes-links-encoding-2309159-1-beta4.patch | 1.1 KB | jlongbottom |
Comments
Comment #1
jlongbottom CreditAttribution: jlongbottom commentedOk after a lot of head scratching I have an admittedly simple patch that appears to work.
Comment #2
jlongbottom CreditAttribution: jlongbottom commentedHere is a patch for the latest dev
Comment #3
yuer CreditAttribution: yuer commented#1 works for me (7.x-1.0-beta4).
Thanks a lot.
Comment #4
ChristophWeber CreditAttribution: ChristophWeber commentedConfirmed, #1 works for me cleanly.
Comment #5
Deciphered CreditAttribution: Deciphered commentedThis fix will actually break things for users who type in the path to the file manually without URL encoding the spaces and other symbols.
Comment #6
Deciphered CreditAttribution: Deciphered commentedMarking as a duplicate of #2119789: Failed regex in _filefield_paths_replace_path with spaces in old filename.