sync/import directory with char space in its name, phantom albums #1174

Open
opened 2026-10-05 00:34:29 +02:00 by adam · 0 comments
Owner

Reproduce it: Let's assume you want to import a new subdirectory tree in your gallery. One of your directories comes with a char space in its name.

./galleries/directory_02/Apples Pears/
./galleries/directory_02/Apples Pears/apple/
./galleries/directory_02/Apples Pears/pear/

Despite the error message after synchronization simulation, it is possible to proceed.
[./galleries/directory_02/Apples Pears] PWG-UPDATE-1 (wrong filename)
This directory (with space in its spelling) is then rejected (not created as an album), but its subdirectories are like becoming phantom first level albums.

Expected: Subdirectories must get rejected too.

Workaround solving: Hopefully, after removing spaces from directory names in the file system, and a synchronization, every phantoms are going away !
If many subdirectories were using the same name, in different rejected directories, several synchronizations may be needed.

Environment: Piwigo 11.3.0 with default conf:

// permitted characters for files/directories during synchronization
$conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/';

Reference: That's a bug discussed on forum: How-To and Troubleshooting » Can't synchronise directory listing
https://piwigo.org/forum/viewtopic.php?id=31088

**Reproduce it**: Let's assume you want to import a new subdirectory tree in your gallery. One of your directories comes with a char space in its name. ``` ./galleries/directory_02/Apples Pears/ ./galleries/directory_02/Apples Pears/apple/ ./galleries/directory_02/Apples Pears/pear/ ``` Despite the error message after synchronization simulation, it is possible to proceed. `[./galleries/directory_02/Apples Pears] PWG-UPDATE-1 (wrong filename)` This directory (with space in its spelling) is then rejected (not created as an album), but its subdirectories are like becoming phantom first level albums. **Expected**: Subdirectories must get rejected too. **Workaround solving**: Hopefully, after removing spaces from directory names in the file system, and a synchronization, every phantoms are going away ! If many subdirectories were using the same name, in different rejected directories, several synchronizations may be needed. **Environment**: Piwigo 11.3.0 with default conf: ``` // permitted characters for files/directories during synchronization $conf['sync_chars_regex'] = '/^[a-zA-Z0-9-_.]+$/'; ``` **Reference**: That's a bug discussed on forum: How-To and Troubleshooting » Can't synchronise directory listing https://piwigo.org/forum/viewtopic.php?id=31088 <!-- github-sync-id:818781412 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/Piwigo#1174